library(tidyverse)
library(ggpubr)
library(ggplot2)
library(car)
library(data.table)
library(mltools)
library(olsrr)
library(scales)
library(caret)
library(dataPreparation)
library(regclass)
# options
#options(scipen = 999)
data_train= read_csv("../Data/train.csv")
data_test = read_csv("../Data/test.csv")
#Convert <chr> to <fctr>
data_train = as.data.frame(unclass(data_train))
data_train$Neighborhood = as.factor(data_train$Neighborhood )
data_test = as.data.frame(unclass(data_test))
data_test$Neighborhood = as.factor(data_test$Neighborhood )
# add new remodel variable
data_train$Remodel =ifelse(data_train$YearBuilt==data_train$YearRemodAdd, 0, 1)
data_test$Remodel =ifelse(data_test$YearBuilt==data_test$YearRemodAdd, 0, 1)
data_train$GrLivArea2 = data_train$GrLivArea^2
data_test$GrLivArea2 = data_test$GrLivArea^2
dim(data_train)
## [1] 1460   83
dim(data_test)
## [1] 1459   82
 # In this function we will handle missing values ffor numerical and factor columns 
impute_missing_values_func = function(data){
 
  # create list of  Numerical Columns names
    nums_col = data %>% purrr::discard(~!is.numeric(.)) %>% names
    
    # create list of  factor Columns names
    char_col = data %>% purrr::discard(~!is.character(.)) %>% names
    
    # Create a new dataframe for q2 train data, this is a copy of the original train DF
    treated_data = data
    
    
    # Input NA's in numerical columns with the mediam value per column
    for (i in nums_col){
     treated_data = treated_data %>% mutate_at(vars(UQ(as.name(i))),~ifelse(is.na(.x), median(.x, na.rm = TRUE), .x))
    }
    
    # Create a new factor level called None for each NA in factor columns
    for (i in char_col){
      treated_data[i][is.na(treated_data[i])] = "None"
    }
    
    return(treated_data)
  
}
    
show_missing_values = function(data){
      missing.values <- data %>%
        gather(key = "key", value = "val") %>%
        mutate(is.missing = is.na(val)) %>%
        group_by(key, is.missing) %>%
        summarise(num.missing = n()) %>%
        filter(is.missing==T) %>%
        select(-is.missing) %>%
        arrange(desc(num.missing))
    
    print(missing.values$key)
  
}    
# Let's handle the missing values
# show missing values on train DF


#show_missing_values(data_train)
#show_missing_values(data_test)
#data_train_q2 = impute_missing_values_func(data_train)
#data_test_q2 = impute_missing_values_func(data_test)

# show missing values on treated train DF - there should be 0
#show_missing_values(data_train_q2)
#show_missing_values(data_test_q2)
#encoding = build_encoding(data_set = data_train_q2, cols = "auto", verbose = TRUE)
#enconded_data_train_q2 = one_hot_encoder(data_set = data_train_q2, encoding = encoding, drop = TRUE, verbose = F)
#enconded_data_test_q2 = one_hot_encoder(data_set = data_test_q2, encoding = encoding, drop = TRUE, verbose = F)
#print(dim(enconded_data_train_q2))
#print(dim(enconded_data_test_q2))
# Select relevant columns and Neighborhood
train_data_q1 = data_train %>% select(Id, GrLivArea, Neighborhood, SalePrice ) %>% filter(Neighborhood == "NAmes" | Neighborhood ==  "Edwards" | Neighborhood ==  "BrkSide") %>% droplevels()
test_data_q1 = data_test  %>% select(Id, GrLivArea, Neighborhood ) %>% filter(Neighborhood == "NAmes" | Neighborhood ==  "Edwards" | Neighborhood ==  "BrkSide") %>% droplevels()



selected_features_q2 = c("GrLivArea", "Neighborhood", "LotArea", "YrSold", "SaleCondition", "HouseStyle", "KitchenQual", "YearRemodAdd","GarageCars", "PoolArea", "Fireplaces","BsmtFullBath","BsmtHalfBath","FullBath","HalfBath","BedroomAbvGr","Remodel","OverallQual", "GrLivArea2","X1stFlrSF","X2ndFlrSF","PoolArea")

train_data_q2 = data_train %>% select(Id, selected_features_q2,  SalePrice)





# 2.5Fin does not exist in test data so changing it to 1.5Unf
train_data_q2$HouseStyle = as.character(train_data_q2$HouseStyle)
train_data_q2 = train_data_q2 %>%   mutate_at(vars(HouseStyle) ,     ~ifelse(.x=="2.5Fin","1.5Unf",.x  ))
train_data_q2$HouseStyle = as.factor(train_data_q2$HouseStyle)


train_data_q2_process = preProcess(train_data_q2[,2:22], method=c("center", "scale"))
train_data_q2 =  predict(train_data_q2_process, train_data_q2)

test_data_q2 = data_test %>%  select(Id, selected_features_q2)
test_data_q2 =  predict(train_data_q2_process, test_data_q2)





test_data_q2$KitchenQual = as.character(test_data_q2$KitchenQual)
test_data_q2 = test_data_q2 %>%   mutate_at(vars(KitchenQual) ,     ~ifelse(is.na(.x),"Ex",.x  ))
test_data_q2$KitchenQual = as.factor(test_data_q2$KitchenQual)

# Impute = NA in test data
test_data_q2= test_data_q2 %>% mutate_at(vars(GarageCars),~ifelse(is.na(.x), median(.x, na.rm = TRUE), .x))
test_data_q2= test_data_q2 %>% mutate_at(vars(BsmtFullBath),~ifelse(is.na(.x), median(.x, na.rm = TRUE), .x))
test_data_q2= test_data_q2 %>% mutate_at(vars(BsmtHalfBath),~ifelse(is.na(.x), median(.x, na.rm = TRUE), .x))



summary(test_data_q2)
##        Id         GrLivArea         Neighborhood    LotArea       
##  Min.   :1461   Min.   :-2.10943   NAmes  :218   Min.   :-0.9064  
##  1st Qu.:1826   1st Qu.:-0.75733   OldTown:126   1st Qu.:-0.3132  
##  Median :2190   Median :-0.15883   CollgCr:117   Median :-0.1120  
##  Mean   :2190   Mean   :-0.05598   Somerst: 96   Mean   :-0.0699  
##  3rd Qu.:2554   3rd Qu.: 0.39114   Edwards: 94   3rd Qu.: 0.1003  
##  Max.   :2919   Max.   : 6.81193   NridgHt: 89   Max.   : 4.6170  
##                                    (Other):719                    
##      YrSold         SaleCondition   HouseStyle  KitchenQual  YearRemodAdd     
##  Min.   :-1.36719   Abnorml:  89   1.5Fin:160   Ex:106      Min.   :-1.68879  
##  1st Qu.:-0.61423   AdjLand:   8   1.5Unf:  5   Fa: 31      1st Qu.:-1.05911  
##  Median : 0.13873   Alloca :  12   1Story:745   Gd:565      Median : 0.34556  
##  Mean   :-0.03467   Family :  26   2.5Unf: 13   TA:757      Mean   :-0.05827  
##  3rd Qu.: 0.89169   Normal :1204   2Story:427               3rd Qu.: 0.92680  
##  Max.   : 1.64465   Partial: 120   SFoyer: 46               Max.   : 1.21743  
##                                    SLvl  : 63                                 
##    GarageCars           PoolArea          Fireplaces        BsmtFullBath     
##  Min.   :-2.364630   Min.   :-0.06867   Min.   :-0.95090   Min.   :-0.81968  
##  1st Qu.:-1.026506   1st Qu.:-0.06867   1st Qu.:-0.95090   1st Qu.:-0.81968  
##  Median : 0.311618   Median :-0.06867   Median :-0.95090   Median :-0.81968  
##  Mean   :-0.001131   Mean   :-0.02525   Mean   :-0.04932   Mean   : 0.01641  
##  3rd Qu.: 0.311618   3rd Qu.:-0.06867   3rd Qu.: 0.60029   3rd Qu.: 1.10743  
##  Max.   : 4.325989   Max.   :19.84307   Max.   : 5.25386   Max.   : 4.96166  
##                                                                              
##   BsmtHalfBath         FullBath           HalfBath         BedroomAbvGr     
##  Min.   :-0.24098   Min.   :-2.84085   Min.   :-0.76136   Min.   :-3.51375  
##  1st Qu.:-0.24098   1st Qu.:-1.02569   1st Qu.:-0.76136   1st Qu.:-1.06210  
##  Median :-0.24098   Median : 0.78947   Median :-0.76136   Median : 0.16372  
##  Mean   : 0.03174   Mean   : 0.01066   Mean   :-0.01038   Mean   :-0.01524  
##  3rd Qu.:-0.24098   3rd Qu.: 0.78947   3rd Qu.: 1.22717   3rd Qu.: 0.16372  
##  Max.   : 8.13589   Max.   : 4.41979   Max.   : 3.21569   Max.   : 3.84119  
##                                                                             
##     Remodel          OverallQual         GrLivArea2         X1stFlrSF       
##  Min.   :-0.95413   Min.   :-3.68715   Min.   :-1.16605   Min.   :-1.95461  
##  1st Qu.:-0.95413   1st Qu.:-0.79488   1st Qu.:-0.64131   1st Qu.:-0.74789  
##  Median :-0.95413   Median :-0.07181   Median :-0.25286   Median :-0.21632  
##  Mean   :-0.04462   Mean   :-0.01482   Mean   :-0.06231   Mean   :-0.01576  
##  3rd Qu.: 1.04735   3rd Qu.: 0.65126   3rd Qu.: 0.18858   3rd Qu.: 0.56875  
##  Max.   : 1.04735   Max.   : 2.82046   Max.   :11.32970   Max.   :10.17201  
##                                                                             
##    X2ndFlrSF       
##  Min.   :-0.79489  
##  1st Qu.:-0.79489  
##  Median :-0.79489  
##  Mean   :-0.04816  
##  3rd Qu.: 0.75369  
##  Max.   : 3.47058  
## 
nrow(test_data_q2)
## [1] 1459
unique(train_data_q2$HouseStyle)
## [1] 2Story 1Story 1.5Fin 1.5Unf SFoyer SLvl   2.5Unf
## Levels: 1.5Fin 1.5Unf 1Story 2.5Unf 2Story SFoyer SLvl
unique(test_data_q2$HouseStyle)
## [1] 1Story 2Story SLvl   1.5Fin SFoyer 2.5Unf 1.5Unf
## Levels: 1.5Fin 1.5Unf 1Story 2.5Unf 2Story SFoyer SLvl

`

Question of interest Is the square footage of the living area and the neighborhood related to the house sales price neighborhood: NAmes, Edwards and BrkSide Note: For living area provide results in increments of 100 sq. ft.

# Create scatter plot graphing function

scatter_func = function (data, i){
  title = paste("SalePrice vs GrLivArea by Neighborhood:", i)
  figure = data %>%  filter (Neighborhood==i) %>%  ggplot(aes(x=GrLivArea, y= SalePrice)) + geom_point() + scale_y_continuous(labels = function(x) format(x, scientific = FALSE)) +  geom_smooth(formlula="lm") + ggtitle(paste0(title))
return (figure)
}


hist_boxplot = function (data) {
  g1 = data %>% ggplot() + geom_histogram(aes(x=SalePrice), fill="steelblue") + scale_x_continuous(labels = function(x) format(x, scientific = FALSE)) + ggtitle("Histogram of Sale Price")
  g2 = data %>% ggplot() + geom_histogram(aes(x=GrLivArea), fill="steelblue") + scale_x_continuous(labels = function(x) format(x, scientific = FALSE)) + ggtitle("Histogram of Square Footage of the Living Area")
  g3 = data %>% ggplot() + geom_boxplot(aes(x=Neighborhood, y=SalePrice, fill=Neighborhood)) + scale_y_continuous(labels = function(x) format(x, scientific = FALSE)) + ggtitle("Boxplot of Sale Price by Neighborhood") +  
    theme(axis.text.x = element_text(angle = 60, hjust = 1, size = 6 ))
  figure =  ggarrange(g1, g2, g3, ncol=1)
  return(figure)
}

press = function (model) {
  pr = resid(model)/(1 - lm.influence(model)$hat)
  return(sum(pr^2))
}
hist_boxplot(train_data_q1)

hist_boxplot(train_data_q2)

for (i in unlist(unique(data_train$Neighborhood)) ) {
  print(scatter_func(data_train, i))
}

# ANALYSIS 1

one_encode_train_data_q1 =  one_hot(as.data.table(train_data_q1, dropUnusedLevels=TRUE))

#Reference Neighborhood_BrkSide
lm_fit_q1 = lm(SalePrice ~-Id- Neighborhood_BrkSide+ GrLivArea+Neighborhood_Edwards+Neighborhood_NAmes+ Neighborhood_Edwards*GrLivArea+Neighborhood_NAmes*GrLivArea, data = one_encode_train_data_q1)


press(lm_fit_q1)
## [1] 340967460744
ols_press(lm_fit_q1)
## [1] 340967460744
summary(lm_fit_q1)
## 
## Call:
## lm(formula = SalePrice ~ -Id - Neighborhood_BrkSide + GrLivArea + 
##     Neighborhood_Edwards + Neighborhood_NAmes + Neighborhood_Edwards * 
##     GrLivArea + Neighborhood_NAmes * GrLivArea, data = one_encode_train_data_q1)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -96204 -14568   -310  12601 181131 
## 
## Coefficients:
##                                 Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                    19971.514  12351.125   1.617  0.10672    
## GrLivArea                         87.163      9.782   8.911  < 2e-16 ***
## Neighborhood_Edwards           68381.591  13969.511   4.895 1.46e-06 ***
## Neighborhood_NAmes             54704.888  13882.334   3.941 9.69e-05 ***
## GrLivArea:Neighborhood_Edwards   -57.412     10.718  -5.357 1.48e-07 ***
## GrLivArea:Neighborhood_NAmes     -32.847     10.815  -3.037  0.00256 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 28550 on 377 degrees of freedom
## Multiple R-squared:  0.4474, Adjusted R-squared:   0.44 
## F-statistic: 61.04 on 5 and 377 DF,  p-value: < 2.2e-16
confint(lm_fit_q1,  level=0.995)
##                                      0.25 %       99.75 %
## (Intercept)                    -14903.77718  54846.804774
## GrLivArea                          59.54168    114.783388
## Neighborhood_Edwards            28936.53793 107826.644037
## Neighborhood_NAmes              15505.99469  93903.780794
## GrLivArea:Neighborhood_Edwards    -87.67520    -27.149262
## GrLivArea:Neighborhood_NAmes      -63.38554     -2.307803
ols_plot_cooksd_bar(lm_fit_q1)

ols_plot_dffits(lm_fit_q1)

ols_plot_diagnostics(lm_fit_q1)

ols_plot_resid_fit(lm_fit_q1)

ols_plot_resid_pot(lm_fit_q1)

ols_pred_rsq(lm_fit_q1)
## [1] 0.3869169
plot(lm_fit_q1)

ANALYSIS 2

one_encode_train_data_q2 =  one_hot(as.data.table(train_data_q2, dropUnusedLevels=TRUE))
one_encode_train_data_q2
##         Id  GrLivArea Neighborhood_Blmngtn Neighborhood_Blueste
##    1:    1  0.3702066                    0                    0
##    2:    2 -0.4823466                    0                    0
##    3:    3  0.5148362                    0                    0
##    4:    4  0.3835277                    0                    0
##    5:    5  1.2988806                    0                    0
##   ---                                                          
## 1456: 1456  0.2503163                    0                    0
## 1457: 1457  1.0610031                    0                    0
## 1458: 1458  1.5691096                    0                    0
## 1459: 1459 -0.8325024                    0                    0
## 1460: 1460 -0.4937648                    0                    0
##       Neighborhood_BrDale Neighborhood_BrkSide Neighborhood_ClearCr
##    1:                   0                    0                    0
##    2:                   0                    0                    0
##    3:                   0                    0                    0
##    4:                   0                    0                    0
##    5:                   0                    0                    0
##   ---                                                              
## 1456:                   0                    0                    0
## 1457:                   0                    0                    0
## 1458:                   0                    0                    0
## 1459:                   0                    0                    0
## 1460:                   0                    0                    0
##       Neighborhood_CollgCr Neighborhood_Crawfor Neighborhood_Edwards
##    1:                    1                    0                    0
##    2:                    0                    0                    0
##    3:                    1                    0                    0
##    4:                    0                    1                    0
##    5:                    0                    0                    0
##   ---                                                               
## 1456:                    0                    0                    0
## 1457:                    0                    0                    0
## 1458:                    0                    1                    0
## 1459:                    0                    0                    0
## 1460:                    0                    0                    1
##       Neighborhood_Gilbert Neighborhood_IDOTRR Neighborhood_MeadowV
##    1:                    0                   0                    0
##    2:                    0                   0                    0
##    3:                    0                   0                    0
##    4:                    0                   0                    0
##    5:                    0                   0                    0
##   ---                                                              
## 1456:                    1                   0                    0
## 1457:                    0                   0                    0
## 1458:                    0                   0                    0
## 1459:                    0                   0                    0
## 1460:                    0                   0                    0
##       Neighborhood_Mitchel Neighborhood_NAmes Neighborhood_NoRidge
##    1:                    0                  0                    0
##    2:                    0                  0                    0
##    3:                    0                  0                    0
##    4:                    0                  0                    0
##    5:                    0                  0                    1
##   ---                                                             
## 1456:                    0                  0                    0
## 1457:                    0                  0                    0
## 1458:                    0                  0                    0
## 1459:                    0                  1                    0
## 1460:                    0                  0                    0
##       Neighborhood_NPkVill Neighborhood_NridgHt Neighborhood_NWAmes
##    1:                    0                    0                   0
##    2:                    0                    0                   0
##    3:                    0                    0                   0
##    4:                    0                    0                   0
##    5:                    0                    0                   0
##   ---                                                              
## 1456:                    0                    0                   0
## 1457:                    0                    0                   1
## 1458:                    0                    0                   0
## 1459:                    0                    0                   0
## 1460:                    0                    0                   0
##       Neighborhood_OldTown Neighborhood_Sawyer Neighborhood_SawyerW
##    1:                    0                   0                    0
##    2:                    0                   0                    0
##    3:                    0                   0                    0
##    4:                    0                   0                    0
##    5:                    0                   0                    0
##   ---                                                              
## 1456:                    0                   0                    0
## 1457:                    0                   0                    0
## 1458:                    0                   0                    0
## 1459:                    0                   0                    0
## 1460:                    0                   0                    0
##       Neighborhood_Somerst Neighborhood_StoneBr Neighborhood_SWISU
##    1:                    0                    0                  0
##    2:                    0                    0                  0
##    3:                    0                    0                  0
##    4:                    0                    0                  0
##    5:                    0                    0                  0
##   ---                                                             
## 1456:                    0                    0                  0
## 1457:                    0                    0                  0
## 1458:                    0                    0                  0
## 1459:                    0                    0                  0
## 1460:                    0                    0                  0
##       Neighborhood_Timber Neighborhood_Veenker     LotArea     YrSold
##    1:                   0                    0 -0.20707076  0.1387300
##    2:                   0                    1 -0.09185490 -0.6142282
##    3:                   0                    0  0.07345481  0.1387300
##    4:                   0                    0 -0.09686428 -1.3671863
##    5:                   0                    0  0.37501979  0.1387300
##   ---                                                                
## 1456:                   0                    0 -0.26047080 -0.6142282
## 1457:                   0                    0  0.26631614  1.6446462
## 1458:                   0                    0 -0.14775964  1.6446462
## 1459:                   0                    0 -0.08013294  1.6446462
## 1460:                   0                    0 -0.05809164  0.1387300
##       SaleCondition_Abnorml SaleCondition_AdjLand SaleCondition_Alloca
##    1:                     0                     0                    0
##    2:                     0                     0                    0
##    3:                     0                     0                    0
##    4:                     1                     0                    0
##    5:                     0                     0                    0
##   ---                                                                 
## 1456:                     0                     0                    0
## 1457:                     0                     0                    0
## 1458:                     0                     0                    0
## 1459:                     0                     0                    0
## 1460:                     0                     0                    0
##       SaleCondition_Family SaleCondition_Normal SaleCondition_Partial
##    1:                    0                    1                     0
##    2:                    0                    1                     0
##    3:                    0                    1                     0
##    4:                    0                    0                     0
##    5:                    0                    1                     0
##   ---                                                                
## 1456:                    0                    1                     0
## 1457:                    0                    1                     0
## 1458:                    0                    1                     0
## 1459:                    0                    1                     0
## 1460:                    0                    1                     0
##       HouseStyle_1.5Fin HouseStyle_1.5Unf HouseStyle_1Story HouseStyle_2.5Unf
##    1:                 0                 0                 0                 0
##    2:                 0                 0                 1                 0
##    3:                 0                 0                 0                 0
##    4:                 0                 0                 0                 0
##    5:                 0                 0                 0                 0
##   ---                                                                        
## 1456:                 0                 0                 0                 0
## 1457:                 0                 0                 1                 0
## 1458:                 0                 0                 0                 0
## 1459:                 0                 0                 1                 0
## 1460:                 0                 0                 1                 0
##       HouseStyle_2Story HouseStyle_SFoyer HouseStyle_SLvl KitchenQual_Ex
##    1:                 1                 0               0              0
##    2:                 0                 0               0              0
##    3:                 1                 0               0              0
##    4:                 1                 0               0              0
##    5:                 1                 0               0              0
##   ---                                                                   
## 1456:                 1                 0               0              0
## 1457:                 0                 0               0              0
## 1458:                 1                 0               0              0
## 1459:                 0                 0               0              0
## 1460:                 0                 0               0              0
##       KitchenQual_Fa KitchenQual_Gd KitchenQual_TA YearRemodAdd GarageCars
##    1:              0              1              0    0.8783671  0.3116179
##    2:              0              0              1   -0.4294298  0.3116179
##    3:              0              1              0    0.8299302  0.3116179
##    4:              0              1              0   -0.7200514  1.6497417
##    5:              0              1              0    0.7330564  1.6497417
##   ---                                                                     
## 1456:              0              0              1    0.7330564  0.3116179
## 1457:              0              0              1    0.1518133  0.3116179
## 1458:              0              1              0    1.0236779 -1.0265059
## 1459:              0              1              0    0.5393087 -1.0265059
## 1460:              0              0              1   -0.9622360 -1.0265059
##          PoolArea Fireplaces BsmtFullBath BsmtHalfBath  FullBath   HalfBath
##    1: -0.06866822 -0.9509007    1.1074307   -0.2409785  0.789470  1.2271649
##    2: -0.06866822  0.6002892   -0.8196835    3.9474568  0.789470 -0.7613598
##    3: -0.06866822  0.6002892    1.1074307   -0.2409785  0.789470  1.2271649
##    4: -0.06866822  0.6002892    1.1074307   -0.2409785 -1.025689 -0.7613598
##    5: -0.06866822  0.6002892    1.1074307   -0.2409785  0.789470  1.2271649
##   ---                                                                      
## 1456: -0.06866822  0.6002892   -0.8196835   -0.2409785  0.789470  1.2271649
## 1457: -0.06866822  2.1514792    1.1074307   -0.2409785  0.789470 -0.7613598
## 1458: -0.06866822  2.1514792   -0.8196835   -0.2409785  0.789470 -0.7613598
## 1459: -0.06866822 -0.9509007    1.1074307   -0.2409785 -1.025689 -0.7613598
## 1460: -0.06866822 -0.9509007    1.1074307   -0.2409785 -1.025689  1.2271649
##       BedroomAbvGr    Remodel OverallQual  GrLivArea2   X1stFlrSF  X2ndFlrSF
##    1:     0.163723 -0.9541335  0.65125610  0.17030031 -0.79316202  1.1614536
##    2:     0.163723 -0.9541335 -0.07181151 -0.47473095  0.25705235 -0.7948909
##    3:     0.163723  1.0473535  0.65125610  0.29901821 -0.62761099  1.1889432
##    4:     0.163723  1.0473535  0.65125610  0.18192191 -0.52155486  0.9369551
##    5:     1.389547 -0.9541335  1.37432370  1.09420744 -0.04559563  1.6173231
##   ---                                                                       
## 1456:     0.163723  1.0473535 -0.07181151  0.06784232 -0.54224874  0.7949254
## 1457:     0.163723  1.0473535 -0.07181151  0.83556873  2.35489437 -0.7948909
## 1458:     1.389547  1.0473535  0.65125610  1.40638866  0.06563397  1.8441125
## 1459:    -1.062101  1.0473535 -0.79487911 -0.68331813 -0.21890687 -0.7948909
## 1460:     0.163723 -0.9541335 -0.79487911 -0.48205010  0.24153194 -0.7948909
##       SalePrice
##    1:    208500
##    2:    181500
##    3:    223500
##    4:    140000
##    5:    250000
##   ---          
## 1456:    175000
## 1457:    210000
## 1458:    266500
## 1459:    142125
## 1460:    147500
one_encode_test_data_q2 =  one_hot(as.data.table(test_data_q2, dropUnusedLevels=TRUE))


#Refferences: Neighborhood_BrkSide KitchenQual_TA HouseStyle_SLvl SaleCondition_Partial


lm_fit_q2 = lm(SalePrice ~.-SaleCondition_Partial-Id-HouseStyle_SLvl-Neighborhood_BrkSide-KitchenQual_TA+

                  (Neighborhood_Blmngtn+Neighborhood_Blueste+Neighborhood_BrDale+Neighborhood_ClearCr+Neighborhood_CollgCr+Neighborhood_Crawfor+Neighborhood_Edwards+Neighborhood_Gilbert+Neighborhood_IDOTRR+Neighborhood_MeadowV+Neighborhood_Mitchel+Neighborhood_NAmes+Neighborhood_NPkVill+Neighborhood_NridgHt+Neighborhood_NWAmes+Neighborhood_OldTown+Neighborhood_Sawyer+Neighborhood_SawyerW+Neighborhood_Somerst+Neighborhood_StoneBr+Neighborhood_SWISU+Neighborhood_Timber+Neighborhood_Veenker+SaleCondition_Abnorml+SaleCondition_AdjLand+SaleCondition_Alloca+SaleCondition_Family+SaleCondition_Normal+HouseStyle_1.5Fin+HouseStyle_1.5Unf+HouseStyle_1Story+HouseStyle_2.5Unf+HouseStyle_2Story+HouseStyle_SFoyer+KitchenQual_Ex+KitchenQual_Fa+KitchenQual_Gd )*GrLivArea +

                  (Neighborhood_Blmngtn+Neighborhood_BrDale+Neighborhood_ClearCr+Neighborhood_CollgCr+Neighborhood_Crawfor+Neighborhood_Edwards+Neighborhood_Gilbert+Neighborhood_IDOTRR+Neighborhood_MeadowV+Neighborhood_Mitchel+Neighborhood_NAmes+Neighborhood_NPkVill+Neighborhood_NridgHt+Neighborhood_NWAmes+Neighborhood_OldTown+Neighborhood_Sawyer+Neighborhood_SawyerW+Neighborhood_Somerst+Neighborhood_StoneBr+Neighborhood_SWISU+Neighborhood_Timber+Neighborhood_Veenker+SaleCondition_Abnorml+SaleCondition_AdjLand+SaleCondition_Alloca+SaleCondition_Family+SaleCondition_Normal+HouseStyle_1.5Fin+HouseStyle_1.5Unf+HouseStyle_1Story+HouseStyle_2.5Unf+HouseStyle_2Story+HouseStyle_SFoyer+KitchenQual_Ex+KitchenQual_Fa+KitchenQual_Gd)*GrLivArea2 +

                  (Neighborhood_Blmngtn+Neighborhood_BrDale+Neighborhood_ClearCr+Neighborhood_CollgCr+Neighborhood_Crawfor+Neighborhood_Edwards+Neighborhood_Gilbert+Neighborhood_IDOTRR+Neighborhood_MeadowV+Neighborhood_Mitchel+Neighborhood_NAmes+Neighborhood_NPkVill+Neighborhood_NridgHt+Neighborhood_NWAmes+Neighborhood_OldTown+Neighborhood_Sawyer+Neighborhood_SawyerW+Neighborhood_Somerst+Neighborhood_StoneBr+Neighborhood_SWISU+Neighborhood_Timber+Neighborhood_Veenker+SaleCondition_Abnorml+SaleCondition_AdjLand+SaleCondition_Alloca+SaleCondition_Family+SaleCondition_Normal+HouseStyle_1.5Fin+HouseStyle_1.5Unf+HouseStyle_1Story+HouseStyle_2.5Unf+HouseStyle_2Story+HouseStyle_SFoyer)*LotArea +

                  (Neighborhood_Blmngtn+Neighborhood_BrDale+Neighborhood_ClearCr+Neighborhood_CollgCr+Neighborhood_Crawfor+Neighborhood_Edwards+Neighborhood_Gilbert+Neighborhood_IDOTRR+Neighborhood_MeadowV+Neighborhood_Mitchel+Neighborhood_NAmes+Neighborhood_NPkVill+Neighborhood_NridgHt+Neighborhood_NWAmes+Neighborhood_OldTown+Neighborhood_Sawyer+Neighborhood_SawyerW+Neighborhood_Somerst+Neighborhood_StoneBr+Neighborhood_SWISU+Neighborhood_Timber+Neighborhood_Veenker+SaleCondition_Abnorml+SaleCondition_Alloca+SaleCondition_Family+SaleCondition_Normal+HouseStyle_1.5Fin+HouseStyle_1.5Unf+HouseStyle_1Story+HouseStyle_2.5Unf+HouseStyle_2Story+HouseStyle_SFoyer+KitchenQual_Ex+KitchenQual_Fa+KitchenQual_Gd ) * BedroomAbvGr

                , data = one_encode_train_data_q2)


# lm_fit_q2 = lm(SalePrice ~.-Id
#               - SaleCondition.Family  
# -SaleType.Oth
# -MiscFeature.TenC 
# -Fence.MnWw 
# -PoolQC.Gd 
# -PavedDrive.P
# -GarageCond.Ex
# -GarageCond.None
# -GarageQual.Po
# -GarageFinish.Fin 
# -GarageType.CarPort
# -FireplaceQu.Po  
# -Functional.Sev 
# -KitchenQual.Fa
# -Electrical.None 
# -CentralAir.N 
# -HeatingQC.Po
# -Heating.Floor
# -BsmtFinType2.GLQ 
# -BsmtFinType1.LwQ  
# -BsmtExposure.None 
# -BsmtCond.Po  
# -BsmtCond.None
# -BsmtQual.Fa 
# -Foundation.Stone 
# -ExterCond.Ex  
# -ExterQual.Fa 
# -MasVnrType.BrkCmn
# -Exterior2nd.CBlock 
# -Exterior1st.CBlock
# -RoofMatl.ClyTile
# -RoofStyle.Shed  
# -HouseStyle.2.5Fin 
# -BldgType.Twnhs
# -Condition2.RRAe 
# -Condition1.RRNe 
# -Neighborhood.Blueste
# -MSZoning.RH
# -Alley.Pave 
# -Utilities.NoSeWa 
# -LotConfig.FR3 
# -LandSlope.Sev
# -Street.Grvl
# , enconded_data_train_q2)

summary(lm_fit_q2)
## 
## Call:
## lm(formula = SalePrice ~ . - SaleCondition_Partial - Id - HouseStyle_SLvl - 
##     Neighborhood_BrkSide - KitchenQual_TA + (Neighborhood_Blmngtn + 
##     Neighborhood_Blueste + Neighborhood_BrDale + Neighborhood_ClearCr + 
##     Neighborhood_CollgCr + Neighborhood_Crawfor + Neighborhood_Edwards + 
##     Neighborhood_Gilbert + Neighborhood_IDOTRR + Neighborhood_MeadowV + 
##     Neighborhood_Mitchel + Neighborhood_NAmes + Neighborhood_NPkVill + 
##     Neighborhood_NridgHt + Neighborhood_NWAmes + Neighborhood_OldTown + 
##     Neighborhood_Sawyer + Neighborhood_SawyerW + Neighborhood_Somerst + 
##     Neighborhood_StoneBr + Neighborhood_SWISU + Neighborhood_Timber + 
##     Neighborhood_Veenker + SaleCondition_Abnorml + SaleCondition_AdjLand + 
##     SaleCondition_Alloca + SaleCondition_Family + SaleCondition_Normal + 
##     HouseStyle_1.5Fin + HouseStyle_1.5Unf + HouseStyle_1Story + 
##     HouseStyle_2.5Unf + HouseStyle_2Story + HouseStyle_SFoyer + 
##     KitchenQual_Ex + KitchenQual_Fa + KitchenQual_Gd) * GrLivArea + 
##     (Neighborhood_Blmngtn + Neighborhood_BrDale + Neighborhood_ClearCr + 
##         Neighborhood_CollgCr + Neighborhood_Crawfor + Neighborhood_Edwards + 
##         Neighborhood_Gilbert + Neighborhood_IDOTRR + Neighborhood_MeadowV + 
##         Neighborhood_Mitchel + Neighborhood_NAmes + Neighborhood_NPkVill + 
##         Neighborhood_NridgHt + Neighborhood_NWAmes + Neighborhood_OldTown + 
##         Neighborhood_Sawyer + Neighborhood_SawyerW + Neighborhood_Somerst + 
##         Neighborhood_StoneBr + Neighborhood_SWISU + Neighborhood_Timber + 
##         Neighborhood_Veenker + SaleCondition_Abnorml + SaleCondition_AdjLand + 
##         SaleCondition_Alloca + SaleCondition_Family + SaleCondition_Normal + 
##         HouseStyle_1.5Fin + HouseStyle_1.5Unf + HouseStyle_1Story + 
##         HouseStyle_2.5Unf + HouseStyle_2Story + HouseStyle_SFoyer + 
##         KitchenQual_Ex + KitchenQual_Fa + KitchenQual_Gd) * GrLivArea2 + 
##     (Neighborhood_Blmngtn + Neighborhood_BrDale + Neighborhood_ClearCr + 
##         Neighborhood_CollgCr + Neighborhood_Crawfor + Neighborhood_Edwards + 
##         Neighborhood_Gilbert + Neighborhood_IDOTRR + Neighborhood_MeadowV + 
##         Neighborhood_Mitchel + Neighborhood_NAmes + Neighborhood_NPkVill + 
##         Neighborhood_NridgHt + Neighborhood_NWAmes + Neighborhood_OldTown + 
##         Neighborhood_Sawyer + Neighborhood_SawyerW + Neighborhood_Somerst + 
##         Neighborhood_StoneBr + Neighborhood_SWISU + Neighborhood_Timber + 
##         Neighborhood_Veenker + SaleCondition_Abnorml + SaleCondition_AdjLand + 
##         SaleCondition_Alloca + SaleCondition_Family + SaleCondition_Normal + 
##         HouseStyle_1.5Fin + HouseStyle_1.5Unf + HouseStyle_1Story + 
##         HouseStyle_2.5Unf + HouseStyle_2Story + HouseStyle_SFoyer) * 
##         LotArea + (Neighborhood_Blmngtn + Neighborhood_BrDale + 
##     Neighborhood_ClearCr + Neighborhood_CollgCr + Neighborhood_Crawfor + 
##     Neighborhood_Edwards + Neighborhood_Gilbert + Neighborhood_IDOTRR + 
##     Neighborhood_MeadowV + Neighborhood_Mitchel + Neighborhood_NAmes + 
##     Neighborhood_NPkVill + Neighborhood_NridgHt + Neighborhood_NWAmes + 
##     Neighborhood_OldTown + Neighborhood_Sawyer + Neighborhood_SawyerW + 
##     Neighborhood_Somerst + Neighborhood_StoneBr + Neighborhood_SWISU + 
##     Neighborhood_Timber + Neighborhood_Veenker + SaleCondition_Abnorml + 
##     SaleCondition_Alloca + SaleCondition_Family + SaleCondition_Normal + 
##     HouseStyle_1.5Fin + HouseStyle_1.5Unf + HouseStyle_1Story + 
##     HouseStyle_2.5Unf + HouseStyle_2Story + HouseStyle_SFoyer + 
##     KitchenQual_Ex + KitchenQual_Fa + KitchenQual_Gd) * BedroomAbvGr, 
##     data = one_encode_train_data_q2)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -152170  -10653    -481   11008  128503 
## 
## Coefficients:
##                                      Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                         1.983e+05  7.142e+03  27.769  < 2e-16 ***
## GrLivArea                          -3.482e+04  3.513e+04  -0.991 0.321714    
## Neighborhood_Blmngtn               -1.504e+05  1.706e+05  -0.882 0.378121    
## Neighborhood_Blueste               -1.501e+04  2.074e+04  -0.723 0.469552    
## Neighborhood_BrDale                 1.419e+05  3.258e+05   0.436 0.663244    
## Neighborhood_ClearCr               -1.417e+04  8.074e+03  -1.755 0.079471 .  
## Neighborhood_CollgCr               -7.054e+03  5.303e+03  -1.330 0.183749    
## Neighborhood_Crawfor                1.366e+03  5.770e+03   0.237 0.812821    
## Neighborhood_Edwards               -3.253e+04  5.335e+03  -6.098 1.43e-09 ***
## Neighborhood_Gilbert               -1.188e+04  7.477e+03  -1.588 0.112451    
## Neighborhood_IDOTRR                -1.641e+04  1.524e+04  -1.077 0.281635    
## Neighborhood_MeadowV               -9.914e+03  7.839e+04  -0.126 0.899379    
## Neighborhood_Mitchel               -1.609e+04  7.288e+03  -2.208 0.027452 *  
## Neighborhood_NAmes                 -2.410e+04  4.890e+03  -4.928 9.42e-07 ***
## Neighborhood_NoRidge               -7.539e+03  1.025e+04  -0.735 0.462325    
## Neighborhood_NPkVill                7.733e+05  1.238e+06   0.625 0.532185    
## Neighborhood_NridgHt               -8.992e+03  9.384e+03  -0.958 0.338094    
## Neighborhood_NWAmes                -1.951e+04  6.856e+03  -2.846 0.004493 ** 
## Neighborhood_OldTown               -2.664e+04  5.170e+03  -5.153 2.98e-07 ***
## Neighborhood_Sawyer                -2.465e+04  6.557e+03  -3.760 0.000178 ***
## Neighborhood_SawyerW               -1.631e+04  5.693e+03  -2.865 0.004243 ** 
## Neighborhood_Somerst               -4.316e+03  8.346e+03  -0.517 0.605175    
## Neighborhood_StoneBr                3.289e+03  1.030e+04   0.319 0.749546    
## Neighborhood_SWISU                 -2.732e+04  9.945e+03  -2.748 0.006090 ** 
## Neighborhood_Timber                -1.937e+04  8.458e+03  -2.290 0.022185 *  
## Neighborhood_Veenker               -5.665e+03  1.940e+04  -0.292 0.770306    
## LotArea                             2.404e+04  1.360e+04   1.768 0.077294 .  
## YrSold                             -9.853e+01  6.349e+02  -0.155 0.876688    
## SaleCondition_Abnorml              -2.107e+04  4.389e+03  -4.800 1.78e-06 ***
## SaleCondition_AdjLand              -1.059e+06  1.939e+06  -0.546 0.585111    
## SaleCondition_Alloca               -1.930e+04  8.939e+03  -2.159 0.031007 *  
## SaleCondition_Family               -1.859e+04  9.584e+03  -1.939 0.052680 .  
## SaleCondition_Normal               -8.004e+03  3.551e+03  -2.254 0.024374 *  
## HouseStyle_1.5Fin                  -8.128e+03  4.827e+03  -1.684 0.092477 .  
## HouseStyle_1.5Unf                  -1.901e+04  1.476e+04  -1.288 0.197928    
## HouseStyle_1Story                   2.697e+03  4.294e+03   0.628 0.530086    
## HouseStyle_2.5Unf                   1.408e+04  1.716e+04   0.821 0.412019    
## HouseStyle_2Story                  -6.890e+03  5.489e+03  -1.255 0.209662    
## HouseStyle_SFoyer                   5.589e+03  1.386e+04   0.403 0.686903    
## KitchenQual_Ex                      2.136e+04  4.713e+03   4.533 6.37e-06 ***
## KitchenQual_Fa                     -5.609e+03  6.181e+03  -0.908 0.364314    
## KitchenQual_Gd                      6.855e+03  2.045e+03   3.351 0.000828 ***
## YearRemodAdd                        5.199e+03  1.016e+03   5.118 3.57e-07 ***
## GarageCars                          4.872e+03  9.448e+02   5.157 2.92e-07 ***
## PoolArea                            1.628e+03  8.013e+02   2.032 0.042383 *  
## Fireplaces                          3.885e+03  8.196e+02   4.740 2.38e-06 ***
## BsmtFullBath                        7.269e+03  7.275e+02   9.992  < 2e-16 ***
## BsmtHalfBath                        2.649e+03  6.859e+02   3.863 0.000118 ***
## FullBath                            5.735e+03  1.195e+03   4.798 1.79e-06 ***
## HalfBath                            4.245e+03  1.010e+03   4.205 2.80e-05 ***
## BedroomAbvGr                       -1.936e+04  7.295e+03  -2.653 0.008073 ** 
## Remodel                             7.754e+01  7.854e+02   0.099 0.921367    
## OverallQual                         1.738e+04  1.217e+03  14.279  < 2e-16 ***
## GrLivArea2                          9.665e+04  3.881e+04   2.490 0.012897 *  
## X1stFlrSF                           6.826e+03  7.293e+03   0.936 0.349520    
## X2ndFlrSF                           2.912e+03  7.881e+03   0.370 0.711787    
## GrLivArea:Neighborhood_Blmngtn     -2.356e+05  5.992e+05  -0.393 0.694236    
## GrLivArea:Neighborhood_Blueste     -1.158e+04  5.144e+04  -0.225 0.821990    
## GrLivArea:Neighborhood_BrDale      -6.062e+05  1.248e+06  -0.486 0.627084    
## GrLivArea:Neighborhood_ClearCr      1.008e+05  3.826e+04   2.633 0.008555 ** 
## GrLivArea:Neighborhood_CollgCr     -1.885e+04  1.903e+04  -0.991 0.321942    
## GrLivArea:Neighborhood_Crawfor      3.370e+04  2.044e+04   1.649 0.099495 .  
## GrLivArea:Neighborhood_Edwards      5.700e+04  1.742e+04   3.271 0.001100 ** 
## GrLivArea:Neighborhood_Gilbert     -4.772e+03  4.083e+04  -0.117 0.906981    
## GrLivArea:Neighborhood_IDOTRR       1.454e+04  4.729e+04   0.307 0.758529    
## GrLivArea:Neighborhood_MeadowV      5.525e+04  8.653e+04   0.639 0.523237    
## GrLivArea:Neighborhood_Mitchel     -5.117e+04  4.223e+04  -1.212 0.225859    
## GrLivArea:Neighborhood_NAmes       -1.035e+04  1.626e+04  -0.637 0.524549    
## GrLivArea:Neighborhood_NPkVill      1.998e+06  3.135e+06   0.638 0.523899    
## GrLivArea:Neighborhood_NridgHt      6.194e+04  3.625e+04   1.709 0.087745 .  
## GrLivArea:Neighborhood_NWAmes       1.436e+04  2.761e+04   0.520 0.602940    
## GrLivArea:Neighborhood_OldTown     -2.676e+04  1.727e+04  -1.550 0.121502    
## GrLivArea:Neighborhood_Sawyer      -2.527e+04  2.601e+04  -0.972 0.331379    
## GrLivArea:Neighborhood_SawyerW      1.530e+04  1.895e+04   0.808 0.419444    
## GrLivArea:Neighborhood_Somerst      7.186e+04  4.040e+04   1.779 0.075518 .  
## GrLivArea:Neighborhood_StoneBr      1.005e+05  3.705e+04   2.711 0.006795 ** 
## GrLivArea:Neighborhood_SWISU        9.375e+03  2.627e+04   0.357 0.721272    
## GrLivArea:Neighborhood_Timber       1.009e+05  4.285e+04   2.355 0.018653 *  
## GrLivArea:Neighborhood_Veenker      8.075e+04  1.786e+05   0.452 0.651243    
## GrLivArea:SaleCondition_Abnorml    -2.428e+04  2.078e+04  -1.168 0.242901    
## GrLivArea:SaleCondition_AdjLand     2.697e+06  4.834e+06   0.558 0.577011    
## GrLivArea:SaleCondition_Alloca      9.508e+04  7.756e+04   1.226 0.220431    
## GrLivArea:SaleCondition_Family     -1.917e+03  5.582e+04  -0.034 0.972614    
## GrLivArea:SaleCondition_Normal     -1.461e+04  1.970e+04  -0.741 0.458595    
## GrLivArea:HouseStyle_1.5Fin         5.581e+04  2.733e+04   2.042 0.041317 *  
## GrLivArea:HouseStyle_1.5Unf         1.405e+04  3.820e+04   0.368 0.713047    
## GrLivArea:HouseStyle_1Story         5.459e+04  2.477e+04   2.204 0.027716 *  
## GrLivArea:HouseStyle_2.5Unf        -3.781e+04  6.599e+04  -0.573 0.566819    
## GrLivArea:HouseStyle_2Story         2.327e+04  2.679e+04   0.869 0.385240    
## GrLivArea:HouseStyle_SFoyer         7.430e+03  6.856e+04   0.108 0.913724    
## GrLivArea:KitchenQual_Ex            1.619e+04  1.514e+04   1.069 0.285187    
## GrLivArea:KitchenQual_Fa           -1.460e+04  1.994e+04  -0.732 0.464134    
## GrLivArea:KitchenQual_Gd            1.632e+04  1.052e+04   1.552 0.120977    
## Neighborhood_Blmngtn:GrLivArea2     3.663e+05  8.552e+05   0.428 0.668480    
## Neighborhood_BrDale:GrLivArea2      1.036e+06  2.076e+06   0.499 0.617867    
## Neighborhood_ClearCr:GrLivArea2    -1.247e+05  3.744e+04  -3.331 0.000891 ***
## Neighborhood_CollgCr:GrLivArea2     2.501e+03  2.149e+04   0.116 0.907382    
## Neighborhood_Crawfor:GrLivArea2    -4.199e+04  1.939e+04  -2.166 0.030526 *  
## Neighborhood_Edwards:GrLivArea2    -1.169e+05  1.910e+04  -6.122 1.23e-09 ***
## Neighborhood_Gilbert:GrLivArea2    -2.894e+03  4.542e+04  -0.064 0.949205    
## Neighborhood_IDOTRR:GrLivArea2     -2.987e+04  7.840e+04  -0.381 0.703277    
## Neighborhood_MeadowV:GrLivArea2    -9.104e+04  7.772e+04  -1.171 0.241694    
## Neighborhood_Mitchel:GrLivArea2     4.765e+04  5.821e+04   0.819 0.413160    
## Neighborhood_NAmes:GrLivArea2      -2.940e+04  1.787e+04  -1.646 0.100103    
## Neighborhood_NPkVill:GrLivArea2    -2.775e+06  4.297e+06  -0.646 0.518580    
## Neighborhood_NridgHt:GrLivArea2    -5.122e+04  3.405e+04  -1.504 0.132807    
## Neighborhood_NWAmes:GrLivArea2     -3.134e+04  2.746e+04  -1.142 0.253862    
## Neighborhood_OldTown:GrLivArea2     6.183e+03  1.848e+04   0.335 0.738034    
## Neighborhood_Sawyer:GrLivArea2     -4.763e+03  3.259e+04  -0.146 0.883829    
## Neighborhood_SawyerW:GrLivArea2    -2.627e+04  1.971e+04  -1.333 0.182819    
## Neighborhood_Somerst:GrLivArea2    -8.956e+04  4.374e+04  -2.047 0.040829 *  
## Neighborhood_StoneBr:GrLivArea2    -1.019e+05  3.669e+04  -2.778 0.005553 ** 
## Neighborhood_SWISU:GrLivArea2      -4.568e+04  2.905e+04  -1.573 0.116046    
## Neighborhood_Timber:GrLivArea2     -1.062e+05  4.205e+04  -2.525 0.011680 *  
## Neighborhood_Veenker:GrLivArea2    -9.319e+04  2.127e+05  -0.438 0.661378    
## SaleCondition_Abnorml:GrLivArea2   -3.204e+03  2.156e+04  -0.149 0.881873    
## SaleCondition_AdjLand:GrLivArea2   -4.891e+06  8.782e+06  -0.557 0.577693    
## SaleCondition_Alloca:GrLivArea2    -8.412e+04  6.844e+04  -1.229 0.219265    
## SaleCondition_Family:GrLivArea2    -3.929e+04  6.673e+04  -0.589 0.556131    
## SaleCondition_Normal:GrLivArea2    -4.285e+03  2.059e+04  -0.208 0.835206    
## HouseStyle_1.5Fin:GrLivArea2       -6.322e+04  3.048e+04  -2.074 0.038285 *  
## HouseStyle_1.5Unf:GrLivArea2       -2.959e+04  4.212e+04  -0.703 0.482361    
## HouseStyle_1Story:GrLivArea2       -5.306e+04  2.843e+04  -1.867 0.062187 .  
## HouseStyle_2.5Unf:GrLivArea2        1.454e+04  6.850e+04   0.212 0.831907    
## HouseStyle_2Story:GrLivArea2       -3.211e+04  2.932e+04  -1.095 0.273734    
## HouseStyle_SFoyer:GrLivArea2        1.542e+04  1.005e+05   0.153 0.878093    
## KitchenQual_Ex:GrLivArea2          -1.140e+03  1.564e+04  -0.073 0.941903    
## KitchenQual_Fa:GrLivArea2           2.244e+04  2.485e+04   0.903 0.366641    
## KitchenQual_Gd:GrLivArea2          -7.884e+03  1.234e+04  -0.639 0.522930    
## Neighborhood_Blmngtn:LotArea       -3.032e+05  1.673e+05  -1.812 0.070204 .  
## Neighborhood_BrDale:LotArea        -5.495e+04  4.375e+05  -0.126 0.900067    
## Neighborhood_ClearCr:LotArea       -2.101e+04  5.934e+03  -3.541 0.000413 ***
## Neighborhood_CollgCr:LotArea       -1.384e+04  1.163e+04  -1.190 0.234311    
## Neighborhood_Crawfor:LotArea       -2.893e+04  9.354e+03  -3.092 0.002031 ** 
## Neighborhood_Edwards:LotArea        5.639e+03  9.351e+03   0.603 0.546616    
## Neighborhood_Gilbert:LotArea       -8.742e+03  7.679e+03  -1.139 0.255126    
## Neighborhood_IDOTRR:LotArea        -6.556e+03  1.627e+04  -0.403 0.686980    
## Neighborhood_MeadowV:LotArea        8.550e+03  8.740e+04   0.098 0.922084    
## Neighborhood_Mitchel:LotArea       -2.027e+04  8.202e+03  -2.471 0.013608 *  
## Neighborhood_NAmes:LotArea         -1.837e+04  8.050e+03  -2.282 0.022639 *  
## Neighborhood_NPkVill:LotArea        1.420e+06  2.212e+06   0.642 0.520998    
## Neighborhood_NridgHt:LotArea        3.429e+04  1.156e+04   2.967 0.003063 ** 
## Neighborhood_NWAmes:LotArea        -1.717e+04  1.168e+04  -1.471 0.141639    
## Neighborhood_OldTown:LotArea       -5.021e+03  1.009e+04  -0.497 0.618990    
## Neighborhood_Sawyer:LotArea        -2.524e+04  1.084e+04  -2.329 0.020009 *  
## Neighborhood_SawyerW:LotArea        1.725e+04  1.571e+04   1.098 0.272253    
## Neighborhood_Somerst:LotArea        8.068e+03  1.000e+04   0.807 0.419963    
## Neighborhood_StoneBr:LotArea        7.773e+03  1.016e+04   0.765 0.444505    
## Neighborhood_SWISU:LotArea         -2.234e+04  2.671e+04  -0.836 0.403205    
## Neighborhood_Timber:LotArea        -2.187e+04  5.865e+03  -3.729 0.000201 ***
## Neighborhood_Veenker:LotArea       -1.497e+04  1.111e+04  -1.347 0.178072    
## LotArea:SaleCondition_Abnorml       1.182e+04  9.531e+03   1.240 0.215320    
## LotArea:SaleCondition_AdjLand       1.049e+05  1.408e+05   0.745 0.456663    
## LotArea:SaleCondition_Alloca       -2.511e+04  1.722e+04  -1.458 0.145101    
## LotArea:SaleCondition_Family        3.477e+04  2.085e+04   1.667 0.095721 .  
## LotArea:SaleCondition_Normal        2.208e+04  7.239e+03   3.050 0.002334 ** 
## LotArea:HouseStyle_1.5Fin          -2.293e+04  9.898e+03  -2.316 0.020706 *  
## LotArea:HouseStyle_1.5Unf          -2.850e+04  3.278e+04  -0.869 0.384782    
## LotArea:HouseStyle_1Story          -2.028e+04  9.852e+03  -2.058 0.039777 *  
## LotArea:HouseStyle_2.5Unf           4.134e+04  4.462e+04   0.927 0.354354    
## LotArea:HouseStyle_2Story          -1.934e+04  1.029e+04  -1.880 0.060371 .  
## LotArea:HouseStyle_SFoyer          -1.500e+04  2.127e+04  -0.705 0.480826    
## Neighborhood_Blmngtn:BedroomAbvGr   2.921e+04  1.422e+04   2.054 0.040152 *  
## Neighborhood_BrDale:BedroomAbvGr    1.724e+04  2.690e+04   0.641 0.521677    
## Neighborhood_ClearCr:BedroomAbvGr   5.823e+03  5.179e+03   1.124 0.261058    
## Neighborhood_CollgCr:BedroomAbvGr   1.221e+04  5.367e+03   2.276 0.023022 *  
## Neighborhood_Crawfor:BedroomAbvGr  -2.831e+03  6.023e+03  -0.470 0.638492    
## Neighborhood_Edwards:BedroomAbvGr   9.711e+03  5.281e+03   1.839 0.066160 .  
## Neighborhood_Gilbert:BedroomAbvGr  -1.335e+03  7.374e+03  -0.181 0.856376    
## Neighborhood_IDOTRR:BedroomAbvGr    7.106e+03  8.804e+03   0.807 0.419737    
## Neighborhood_MeadowV:BedroomAbvGr  -3.098e+03  2.275e+04  -0.136 0.891695    
## Neighborhood_Mitchel:BedroomAbvGr   1.882e+03  5.450e+03   0.345 0.729965    
## Neighborhood_NAmes:BedroomAbvGr     1.273e+04  4.540e+03   2.803 0.005138 ** 
## Neighborhood_NPkVill:BedroomAbvGr   8.028e+04  1.106e+05   0.726 0.468034    
## Neighborhood_NridgHt:BedroomAbvGr  -1.589e+04  5.910e+03  -2.689 0.007266 ** 
## Neighborhood_NWAmes:BedroomAbvGr   -3.236e+02  6.613e+03  -0.049 0.960983    
## Neighborhood_OldTown:BedroomAbvGr   3.695e+03  4.965e+03   0.744 0.456914    
## Neighborhood_Sawyer:BedroomAbvGr    9.478e+03  5.684e+03   1.667 0.095673 .  
## Neighborhood_SawyerW:BedroomAbvGr  -7.427e+03  5.974e+03  -1.243 0.214042    
## Neighborhood_Somerst:BedroomAbvGr   7.649e+03  5.917e+03   1.293 0.196349    
## Neighborhood_StoneBr:BedroomAbvGr   2.172e+03  6.648e+03   0.327 0.743905    
## Neighborhood_SWISU:BedroomAbvGr     1.226e+04  7.140e+03   1.717 0.086145 .  
## Neighborhood_Timber:BedroomAbvGr   -5.674e+02  6.636e+03  -0.085 0.931879    
## Neighborhood_Veenker:BedroomAbvGr   7.185e+02  1.012e+04   0.071 0.943411    
## SaleCondition_Abnorml:BedroomAbvGr  1.078e+04  4.471e+03   2.410 0.016099 *  
## SaleCondition_Alloca:BedroomAbvGr   3.357e+03  9.660e+03   0.347 0.728278    
## SaleCondition_Family:BedroomAbvGr   9.759e+03  8.444e+03   1.156 0.248003    
## SaleCondition_Normal:BedroomAbvGr   7.683e+03  3.554e+03   2.162 0.030816 *  
## HouseStyle_1.5Fin:BedroomAbvGr      3.734e+03  5.333e+03   0.700 0.483940    
## HouseStyle_1.5Unf:BedroomAbvGr      1.410e+04  9.196e+03   1.533 0.125407    
## HouseStyle_1Story:BedroomAbvGr      1.286e+03  4.856e+03   0.265 0.791166    
## HouseStyle_2.5Unf:BedroomAbvGr      3.952e+03  8.509e+03   0.464 0.642394    
## HouseStyle_2Story:BedroomAbvGr      6.596e+03  5.218e+03   1.264 0.206472    
## HouseStyle_SFoyer:BedroomAbvGr      3.051e+03  6.931e+03   0.440 0.659890    
## KitchenQual_Ex:BedroomAbvGr         1.245e+03  4.261e+03   0.292 0.770220    
## KitchenQual_Fa:BedroomAbvGr        -4.033e+03  6.451e+03  -0.625 0.532024    
## KitchenQual_Gd:BedroomAbvGr        -1.217e+03  2.426e+03  -0.501 0.616190    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 22300 on 1263 degrees of freedom
## Multiple R-squared:  0.9318, Adjusted R-squared:  0.9212 
## F-statistic:    88 on 196 and 1263 DF,  p-value: < 2.2e-16

Model Selection

Stepwise

#Stepwise Selection
stepwise_fit = ols_step_both_p(lm_fit_q2, pent =0.05, prem=0.05)
stepwise_fit
## 
##                                               Stepwise Selection Summary                                               
## ----------------------------------------------------------------------------------------------------------------------
##                                               Added/                   Adj.                                               
## Step                Variable                 Removed     R-Square    R-Square      C(p)          AIC           RMSE       
## ----------------------------------------------------------------------------------------------------------------------
##    1               OverallQual               addition       0.626       0.625    5473.2780    35659.4925    48622.7618    
##    2                GrLivArea                addition       0.714       0.714    3836.7260    35267.5843    42501.3029    
##    3             KitchenQual_Ex              addition       0.741       0.740    3345.2530    35126.6329    40484.6177    
##    4     Neighborhood_Edwards:GrLivArea2     addition       0.771       0.770    2791.6900    34948.9336    38081.3527    
##    5                X1stFlrSF                addition       0.796       0.795    2330.3780    34782.0599    35953.8101    
##    6               GrLivArea2                addition       0.806       0.805    2149.3760    34711.5763    35084.3755    
##    7                GrLivArea                removal        0.806       0.805    2151.4190    34711.2173    35092.0246    
##    8              BedroomAbvGr               addition       0.810       0.809    2067.1520    34677.7994    34680.8775    
##    9          Neighborhood_Edwards           addition       0.817       0.816    1942.0040    34625.9790    34059.2298    
##   10          Neighborhood_OldTown           addition       0.827       0.826    1760.6540    34546.7000    33135.6663    
##   11              YearRemodAdd               addition       0.837       0.836    1585.2340    34465.4926    32215.8726    
##   12                 LotArea                 addition       0.845       0.844    1428.9560    34389.0355    31372.6138    
##   13              BsmtFullBath               addition       0.851       0.850    1317.3200    34331.9882    30755.1929    
##   14          SaleCondition_Abnorml          addition       0.854       0.853    1269.5220    34307.3401    30486.3252    
##   15          SaleCondition_Normal           addition       0.857       0.856    1210.6470    34276.0899    30151.5651    
##   16            HouseStyle_1.5Unf            addition       0.859       0.857    1186.6550    34263.6589    30013.2991    
##   17          SaleCondition_Alloca           addition       0.860       0.858    1165.6850    34252.7859    29891.6201    
##   18          SaleCondition_Family           addition       0.862       0.860    1130.8810    34233.9199    29689.0608    
##   19           Neighborhood_SWISU            addition       0.863       0.862    1109.7850    34222.6723    29564.9178    
##   20          SaleCondition_AdjLand          addition       0.864       0.862    1100.6680    34218.2523    29510.2211    
##   21            HouseStyle_2.5Unf            addition       0.864       0.863    1091.1180    34213.5522    29452.8070    
##   22          Neighborhood_Blmngtn           addition       0.865       0.863    1079.1140    34207.3876    29380.7722    
##   23           Neighborhood_NWAmes           addition       0.866       0.864    1072.2440    34204.1922    29338.7394    
##   24            HouseStyle_1Story            addition       0.866       0.864    1070.3770    34203.9214    29326.1307    
##   25           Neighborhood_NWAmes           removal        0.865       0.863    1076.8280    34206.8795    29365.7522    
##   26              BsmtHalfBath               addition       0.866       0.864    1070.7500    34204.1405    29328.3313    
##   27          Neighborhood_Blmngtn           removal        0.865       0.863    1084.2920    34211.2443    29409.6814    
##   28          Neighborhood_SawyerW           addition       0.865       0.863    1082.8220    34211.2170    29399.4933    
##   29              BsmtHalfBath               removal        0.865       0.863    1087.7700    34213.2736    29430.1271    
##   30             KitchenQual_Fa              addition       0.865       0.863    1088.5550    34214.5653    29433.2248    
##   31          Neighborhood_SawyerW           removal        0.865       0.863    1090.0740    34214.6167    29443.6673    
##   32          Neighborhood_Veenker           addition       0.865       0.863    1085.6090    34212.8456    29415.8959    
##   33            HouseStyle_1Story            removal        0.865       0.863    1087.9200    34213.3611    29431.0083    
##   34            HouseStyle_1.5Fin            addition       0.865       0.863    1086.1490    34213.1611    29419.0739    
##   35            HouseStyle_2.5Unf            removal        0.864       0.862    1096.5490    34218.3841    29481.6797    
##   36          Neighborhood_MeadowV           addition       0.865       0.863    1090.2340    34215.5446    29443.0972    
##   37          SaleCondition_AdjLand          removal        0.864       0.862    1098.4530    34219.4900    29492.8474    
##   38           Neighborhood_Timber           addition       0.864       0.862    1099.7740    34221.0958    29499.1249    
##   39          Neighborhood_MeadowV           removal        0.864       0.862    1106.1300    34223.9409    29537.8370    
##   40          Neighborhood_Somerst           addition       0.864       0.862    1107.9940    34225.8619    29547.3135    
##   41           Neighborhood_Timber           removal        0.864       0.862    1106.7230    34224.2842    29541.3100    
##   42                 YrSold                  addition       0.864       0.862    1108.3190    34226.0502    29549.2190    
##   43            HouseStyle_1.5Fin            removal        0.864       0.862    1109.5070    34225.8946    29557.6068    
##   44          Neighborhood_Blueste           addition       0.864       0.862    1110.8800    34227.5318    29564.2159    
##   45          Neighborhood_Veenker           removal        0.863       0.861    1114.7300    34228.9108    29588.1543    
##   46            HouseStyle_SFoyer            addition       0.863       0.861    1113.6160    34229.1129    29580.2281    
##   47             KitchenQual_Fa              removal        0.863       0.861    1113.3860    34228.1352    29580.2956    
##   48          Neighborhood_NPkVill           addition       0.863       0.861    1115.3750    34230.1289    29590.5225    
##   49            HouseStyle_SFoyer            removal        0.863       0.861    1116.3000    34229.8160    29597.3275    
##   50          Neighborhood_Gilbert           addition       0.863       0.861    1118.1750    34231.7440    29606.8944    
##   51          Neighborhood_Blueste           removal        0.863       0.861    1116.8030    34230.1060    29600.2670    
##   52          Neighborhood_ClearCr           addition       0.863       0.861    1118.4110    34231.8801    29608.2738    
##   53                 YrSold                  removal        0.863       0.861    1117.1320    34230.2957    29602.1902    
##   54          Neighborhood_Mitchel           addition       0.863       0.861    1115.3170    34230.0954    29590.1834    
##   55          Neighborhood_Somerst           removal        0.863       0.861    1113.3850    34228.1346    29580.2901    
##   56           Neighborhood_IDOTRR           addition       0.864       0.862    1107.7710    34225.7330    29546.0091    
##   57           Neighborhood_SWISU            removal        0.862       0.860    1131.0180    34238.2771    29683.2146    
##   58                 Remodel                 addition       0.862       0.860    1131.7640    34239.5580    29686.2296    
##   59          SaleCondition_Family           removal        0.861       0.859    1165.4030    34257.8559    29882.9109    
##   60          Neighborhood_CollgCr           addition       0.861       0.858    1166.8290    34259.5307    29889.9782    
##   61          SaleCondition_Alloca           removal        0.859       0.857    1186.8790    34269.9516    30006.9537    
##   62          Neighborhood_Crawfor           addition       0.860       0.858    1181.6780    34267.9069    29975.8426    
##   63            HouseStyle_1.5Unf            removal        0.858       0.856    1203.9940    34279.5207    30105.4505    
##   64           Neighborhood_Sawyer           addition       0.858       0.856    1205.6520    34281.3297    30113.9541    
##   65          SaleCondition_Normal           removal        0.855       0.853    1262.9980    34312.0360    30442.5592    
##   66          Neighborhood_NridgHt           addition       0.859       0.857    1189.4390    34272.2659    30020.6238    
##   67          SaleCondition_Abnorml          removal        0.857       0.855    1229.8600    34293.8637    30253.6923    
##   68           Neighborhood_BrDale           addition       0.858       0.855    1220.4160    34289.5352    30198.6959    
##   69          Neighborhood_Gilbert           removal        0.858       0.856    1218.6410    34287.6599    30189.4831    
##   70             KitchenQual_Gd              addition       0.859       0.857    1197.8660    34276.9843    30069.1731    
##   71                 Remodel                 removal        0.859       0.856    1202.4900    34278.6823    30096.8081    
##   72            HouseStyle_2Story            addition       0.859       0.857    1196.0560    34275.9719    30058.7494    
##   73          Neighborhood_Crawfor           removal        0.859       0.857    1201.0740    34277.8925    30088.6684    
##   74                PoolArea                 addition       0.859       0.857    1199.0300    34277.6344    30075.8687    
##   75           Neighborhood_IDOTRR           removal        0.858       0.856    1207.3810    34281.4065    30124.8991    
##   76          Neighborhood_StoneBr           addition       0.861       0.858    1167.9980    34260.1918    29896.7464    
##   77          Neighborhood_CollgCr           removal        0.860       0.858    1166.5870    34258.5249    29889.7582    
##   78           Neighborhood_NAmes            addition       0.861       0.859    1165.6530    34258.8652    29883.1668    
##   79              BsmtFullBath               removal        0.855       0.853    1271.6910    34316.7658    30491.9101    
##   80                FullBath                 addition       0.855       0.853    1273.2940    34318.5500    30500.2633    
##   81          Neighborhood_Mitchel           removal        0.855       0.853    1271.6190    34316.7268    30491.5023    
##   82               GarageCars                addition       0.862       0.860    1142.8510    34245.9026    29750.8022    
##   83          Neighborhood_ClearCr           removal        0.862       0.860    1140.8910    34243.9255    29740.6889    
##   84                HalfBath                 addition       0.862       0.860    1132.0740    34239.7363    29688.0418    
##   85          Neighborhood_NPkVill           removal        0.862       0.860    1131.1380    34238.3459    29683.9134    
##   86               Fireplaces                addition       0.863       0.861    1120.0830    34232.8439    29618.0488    
##   87                 LotArea                 removal        0.856       0.854    1249.9660    34304.9161    30368.4214    
##   88                X2ndFlrSF                addition       0.856       0.854    1244.9830    34303.0871    30339.1763    
##   89              YearRemodAdd               removal        0.853       0.851    1309.1060    34336.9501    30703.4130    
##   90          Neighborhood_NoRidge           addition       0.857       0.854    1239.9770    34300.3357    30310.6020    
##   91          Neighborhood_OldTown           removal        0.852       0.849    1330.1950    34348.2054    30821.9894    
##   92      LotArea:SaleCondition_Normal       addition       0.859       0.857    1187.2280    34271.0253    30007.8716    
##   93          Neighborhood_StoneBr           removal        0.856       0.854    1248.4870    34304.1065    30360.0020    
##   94        GrLivArea:KitchenQual_Ex         addition       0.863       0.861    1127.2330    34236.9573    29659.8013    
##   95               Fireplaces                removal        0.862       0.860    1140.9540    34243.9620    29741.0605    
##   96        KitchenQual_Gd:GrLivArea2        addition       0.868       0.866    1032.5480    34181.5194    29102.0036    
##   97                PoolArea                 removal        0.867       0.866    1037.1830    34183.4735    29131.3049    
##   98      Neighborhood_NAmes:GrLivArea2      addition       0.871       0.869     965.4800    34140.9373    28700.3428    
##   99            HouseStyle_2Story            removal        0.871       0.869     967.1540    34141.1894    28712.4982    
##  100     GrLivArea:Neighborhood_Edwards      addition       0.874       0.872     912.9130    34108.3211    28381.5454    
##  101                HalfBath                 removal        0.871       0.869     975.1710    34146.0929    28760.7546    
##  102     Neighborhood_OldTown:GrLivArea2     addition       0.874       0.872     920.8760    34113.3090    28430.0678    
##  103             KitchenQual_Gd              removal        0.868       0.866    1027.0650    34177.4390    29071.1641    
##  104      Neighborhood_OldTown:LotArea       addition       0.872       0.870     955.8860    34135.0382    28642.4192    
##  105                X1stFlrSF                removal        0.868       0.866    1030.8630    34179.7073    29093.7555    
##  106      Neighborhood_NridgHt:LotArea       addition       0.870       0.868     989.4970    34155.5992    28844.8156    
##  107          Neighborhood_Edwards           removal        0.869       0.867    1013.7260    34169.4457    28991.6928    
##  108     GrLivArea:Neighborhood_StoneBr      addition       0.872       0.870     962.9660    34139.3934    28685.1716    
##  109           Neighborhood_BrDale           removal        0.871       0.869     973.6040    34145.1356    28751.3279    
##  110        GrLivArea:KitchenQual_Gd         addition       0.873       0.871     931.2820    34119.8017    28493.3536    
##  111          Neighborhood_NridgHt           removal        0.869       0.867    1007.4190    34165.6513    28954.0439    
##  112     GrLivArea:Neighborhood_NridgHt      addition       0.872       0.870     961.0360    34138.2078    28673.5274    
##  113           Neighborhood_Sawyer           removal        0.872       0.870     962.4420    34138.3002    28684.1024    
##  114    Neighborhood_NridgHt:BedroomAbvGr    addition       0.875       0.873     898.3490    34099.1544    28292.5879    
##  115              BedroomAbvGr               removal        0.872       0.870     946.8140    34128.6749    28589.7058    
##  116      Neighborhood_SWISU:GrLivArea2      addition       0.874       0.873     910.0430    34106.5196    28364.0411    
##  117           Neighborhood_NAmes            removal        0.873       0.871     933.9260    34120.6898    28511.6306    
##  118     HouseStyle_1Story:BedroomAbvGr      addition       0.875       0.873     893.4620    34096.0657    28262.6766    
##  119     Neighborhood_Sawyer:GrLivArea2      addition       0.877       0.875     873.9850    34084.4131    28140.6341    
##  120       KitchenQual_Gd:BedroomAbvGr       addition       0.877       0.875     859.5930    34075.9064    28049.3289    
##  121    Neighborhood_Blmngtn:BedroomAbvGr    addition       0.879       0.876     840.9490    34064.5650    27931.1991    
##  122        LotArea:HouseStyle_2Story        addition       0.880       0.877     823.4750    34053.8679    27819.7103    
##  123     Neighborhood_ClearCr:GrLivArea2     addition       0.881       0.878     807.3320    34043.9378    27715.9531    
##  124     GrLivArea:Neighborhood_ClearCr      addition       0.882       0.879     789.8610    34033.0259    27603.3069    
##  125     Neighborhood_StoneBr:GrLivArea2     addition       0.883       0.880     773.6820    34022.8660    27498.2052    
##  126     GrLivArea:Neighborhood_Somerst      addition       0.883       0.881     760.5480    34014.6659    27411.9025    
##  127     Neighborhood_Somerst:GrLivArea2     addition       0.885       0.882     739.3820    34000.9116    27273.9503    
##  128    Neighborhood_Veenker:BedroomAbvGr    addition       0.885       0.883     727.8730    33993.6461    27197.0682    
##  129      Neighborhood_Edwards:LotArea       addition       0.886       0.883     717.0470    33986.7939    27124.2493    
##  130     Neighborhood_MeadowV:GrLivArea2     addition       0.887       0.884     708.0090    33981.1328    27062.6682    
##  131     GrLivArea:Neighborhood_Mitchel      addition       0.887       0.884     698.9530    33975.4187    27000.7429    
##  132    Neighborhood_Crawfor:BedroomAbvGr    addition       0.888       0.885     690.2790    33969.9321    26941.0657    
##  133      GrLivArea:Neighborhood_NWAmes      addition       0.888       0.886     680.2460    33963.4464    26872.3311    
##  134     GrLivArea:Neighborhood_CollgCr      addition       0.889       0.886     671.6620    33957.9411    26812.7788    
##  135    Neighborhood_SawyerW:BedroomAbvGr    addition       0.890       0.887     663.1170    33952.4252    26753.2682    
##  136      Neighborhood_StoneBr:LotArea       addition       0.890       0.887     658.1890    33949.4658    26717.2780    
##  137    Neighborhood_CollgCr:BedroomAbvGr    addition       0.890       0.887     652.8710    33946.2092    26678.6263    
##  138      Neighborhood_CollgCr:LotArea       addition       0.891       0.888     645.9760    33941.7944    26629.4735    
##  139     Neighborhood_NAmes:BedroomAbvGr     addition       0.891       0.888     641.3660    33939.0093    26595.2567    
##  140       GrLivArea:HouseStyle_1Story       addition       0.892       0.888     635.6670    33935.4154    26553.7348    
##  141    SaleCondition_Family:BedroomAbvGr    addition       0.892       0.889     631.9160    33933.2228    26525.0101    
## ----------------------------------------------------------------------------------------------------------------------
stepwise_fit$predictors
##  [1] "OverallQual"                       "KitchenQual_Ex"                   
##  [3] "Neighborhood_Edwards:GrLivArea2"   "GrLivArea2"                       
##  [5] "FullBath"                          "GarageCars"                       
##  [7] "X2ndFlrSF"                         "Neighborhood_NoRidge"             
##  [9] "LotArea:SaleCondition_Normal"      "GrLivArea:KitchenQual_Ex"         
## [11] "KitchenQual_Gd:GrLivArea2"         "Neighborhood_NAmes:GrLivArea2"    
## [13] "GrLivArea:Neighborhood_Edwards"    "Neighborhood_OldTown:GrLivArea2"  
## [15] "Neighborhood_OldTown:LotArea"      "Neighborhood_NridgHt:LotArea"     
## [17] "GrLivArea:Neighborhood_StoneBr"    "GrLivArea:KitchenQual_Gd"         
## [19] "GrLivArea:Neighborhood_NridgHt"    "Neighborhood_NridgHt:BedroomAbvGr"
## [21] "Neighborhood_SWISU:GrLivArea2"     "HouseStyle_1Story:BedroomAbvGr"   
## [23] "Neighborhood_Sawyer:GrLivArea2"    "KitchenQual_Gd:BedroomAbvGr"      
## [25] "Neighborhood_Blmngtn:BedroomAbvGr" "LotArea:HouseStyle_2Story"        
## [27] "Neighborhood_ClearCr:GrLivArea2"   "GrLivArea:Neighborhood_ClearCr"   
## [29] "Neighborhood_StoneBr:GrLivArea2"   "GrLivArea:Neighborhood_Somerst"   
## [31] "Neighborhood_Somerst:GrLivArea2"   "Neighborhood_Veenker:BedroomAbvGr"
## [33] "Neighborhood_Edwards:LotArea"      "Neighborhood_MeadowV:GrLivArea2"  
## [35] "GrLivArea:Neighborhood_Mitchel"    "Neighborhood_Crawfor:BedroomAbvGr"
## [37] "GrLivArea:Neighborhood_NWAmes"     "GrLivArea:Neighborhood_CollgCr"   
## [39] "Neighborhood_SawyerW:BedroomAbvGr" "Neighborhood_StoneBr:LotArea"     
## [41] "Neighborhood_CollgCr:BedroomAbvGr" "Neighborhood_CollgCr:LotArea"     
## [43] "Neighborhood_NAmes:BedroomAbvGr"   "GrLivArea:HouseStyle_1Story"      
## [45] "SaleCondition_Family:BedroomAbvGr"
stepwise_model = stepwise_fit$model
ols_press(stepwise_model)
## [1] 1.139737e+12
summary(stepwise_model)
## 
## Call:
## lm(formula = paste(response, "~", paste(preds, collapse = " + ")), 
##     data = l)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -150980  -14350    -145   14067  158971 
## 
## Coefficients:
##                                    Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                        172268.3      988.9 174.209  < 2e-16 ***
## OverallQual                         27471.5     1138.2  24.137  < 2e-16 ***
## KitchenQual_Ex                      22928.4     4261.4   5.381 8.68e-08 ***
## GrLivArea2                          45854.9     2619.6  17.505  < 2e-16 ***
## FullBath                             5218.0     1020.7   5.112 3.62e-07 ***
## GarageCars                           8917.5      946.0   9.427  < 2e-16 ***
## X2ndFlrSF                          -10839.9     1106.0  -9.801  < 2e-16 ***
## Neighborhood_NoRidge                13853.9     5402.9   2.564 0.010445 *  
## Neighborhood_Edwards:GrLivArea2   -116167.0     6877.4 -16.891  < 2e-16 ***
## LotArea:SaleCondition_Normal         5652.0      799.8   7.066 2.49e-12 ***
## KitchenQual_Ex:GrLivArea            15023.5     3508.2   4.282 1.97e-05 ***
## GrLivArea2:KitchenQual_Gd          -28682.6     7536.7  -3.806 0.000147 ***
## GrLivArea2:Neighborhood_NAmes      -30611.7     3462.0  -8.842  < 2e-16 ***
## Neighborhood_Edwards:GrLivArea      70912.3     7124.6   9.953  < 2e-16 ***
## GrLivArea2:Neighborhood_OldTown    -31235.1     3260.5  -9.580  < 2e-16 ***
## LotArea:Neighborhood_OldTown        44837.8     7626.5   5.879 5.13e-09 ***
## LotArea:Neighborhood_NridgHt        50665.3    10972.5   4.617 4.24e-06 ***
## GrLivArea:Neighborhood_StoneBr     171937.3    35076.1   4.902 1.06e-06 ***
## GrLivArea:KitchenQual_Gd            35795.2     7115.0   5.031 5.51e-07 ***
## GrLivArea:Neighborhood_NridgHt      24278.1     4170.2   5.822 7.19e-09 ***
## Neighborhood_NridgHt:BedroomAbvGr  -28109.6     4047.8  -6.944 5.78e-12 ***
## GrLivArea2:Neighborhood_SWISU      -29416.4     4646.8  -6.330 3.28e-10 ***
## BedroomAbvGr:HouseStyle_1Story      -7067.2     1626.1  -4.346 1.49e-05 ***
## GrLivArea2:Neighborhood_Sawyer     -29398.0     5121.8  -5.740 1.16e-08 ***
## KitchenQual_Gd:BedroomAbvGr         -5569.6     1875.6  -2.969 0.003034 ** 
## BedroomAbvGr:Neighborhood_Blmngtn   16416.5     5142.2   3.193 0.001442 ** 
## LotArea:HouseStyle_2Story           11400.7     2673.6   4.264 2.14e-05 ***
## GrLivArea2:Neighborhood_ClearCr   -134067.6    30986.1  -4.327 1.62e-05 ***
## GrLivArea:Neighborhood_ClearCr     103851.0    29295.8   3.545 0.000406 ***
## GrLivArea2:Neighborhood_StoneBr   -156436.3    36318.5  -4.307 1.77e-05 ***
## GrLivArea:Neighborhood_Somerst     101044.4    22787.6   4.434 9.96e-06 ***
## GrLivArea2:Neighborhood_Somerst   -106854.1    26730.8  -3.997 6.73e-05 ***
## BedroomAbvGr:Neighborhood_Veenker  -15671.9     5694.7  -2.752 0.005999 ** 
## Neighborhood_Edwards:LotArea        26059.7     8364.7   3.115 0.001874 ** 
## GrLivArea2:Neighborhood_MeadowV    -25402.1     7540.4  -3.369 0.000775 ***
## GrLivArea:Neighborhood_Mitchel     -17738.9     4888.8  -3.629 0.000295 ***
## BedroomAbvGr:Neighborhood_Crawfor  -13902.7     4374.2  -3.178 0.001513 ** 
## GrLivArea:Neighborhood_NWAmes      -13808.7     3893.3  -3.547 0.000403 ***
## GrLivArea:Neighborhood_CollgCr     -13327.2     3662.1  -3.639 0.000283 ***
## BedroomAbvGr:Neighborhood_SawyerW   -9033.9     3619.5  -2.496 0.012677 *  
## LotArea:Neighborhood_StoneBr        19098.2     9444.8   2.022 0.043356 *  
## BedroomAbvGr:Neighborhood_CollgCr   15338.4     4400.3   3.486 0.000506 ***
## LotArea:Neighborhood_CollgCr       -30347.7    11354.3  -2.673 0.007609 ** 
## Neighborhood_NAmes:BedroomAbvGr      6187.9     2395.0   2.584 0.009875 ** 
## GrLivArea:HouseStyle_1Story          4719.2     2057.7   2.293 0.021971 *  
## BedroomAbvGr:SaleCondition_Family  -10032.1     4975.0  -2.017 0.043935 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 26530 on 1414 degrees of freedom
## Multiple R-squared:  0.892,  Adjusted R-squared:  0.8885 
## F-statistic: 259.4 on 45 and 1414 DF,  p-value: < 2.2e-16
confint(stepwise_model)
##                                          2.5 %       97.5 %
## (Intercept)                        170328.5301  174208.1193
## OverallQual                         25238.8421   29704.2084
## KitchenQual_Ex                      14569.0574   31287.6541
## GrLivArea2                          40716.3121   50993.5724
## FullBath                             3215.8618    7220.1975
## GarageCars                           7061.8242   10773.0804
## X2ndFlrSF                          -13009.5283   -8670.2911
## Neighborhood_NoRidge                 3255.3089   24452.4728
## Neighborhood_Edwards:GrLivArea2   -129658.1122 -102675.9548
## LotArea:SaleCondition_Normal         4083.0014    7220.9957
## KitchenQual_Ex:GrLivArea             8141.6221   21905.3296
## GrLivArea2:KitchenQual_Gd          -43466.8486  -13898.3248
## GrLivArea2:Neighborhood_NAmes      -37402.8328  -23820.4913
## Neighborhood_Edwards:GrLivArea      56936.4026   84888.1500
## GrLivArea2:Neighborhood_OldTown    -37631.0785  -24839.1628
## LotArea:Neighborhood_OldTown        29877.4087   59798.1698
## LotArea:Neighborhood_NridgHt        29141.0464   72189.4808
## GrLivArea:Neighborhood_StoneBr     103130.5857  240744.0949
## GrLivArea:KitchenQual_Gd            21838.1212   49752.2866
## GrLivArea:Neighborhood_NridgHt      16097.7335   32458.4737
## Neighborhood_NridgHt:BedroomAbvGr  -36049.8658  -20169.2428
## GrLivArea2:Neighborhood_SWISU      -38531.7619  -20300.9607
## BedroomAbvGr:HouseStyle_1Story     -10257.0983   -3877.3315
## GrLivArea2:Neighborhood_Sawyer     -39445.1904  -19350.8801
## KitchenQual_Gd:BedroomAbvGr         -9248.8678   -1890.2411
## BedroomAbvGr:Neighborhood_Blmngtn    6329.3398   26503.7207
## LotArea:HouseStyle_2Story            6155.9153   16645.3928
## GrLivArea2:Neighborhood_ClearCr   -194851.3085  -73283.9776
## GrLivArea:Neighborhood_ClearCr      46383.1408  161318.8531
## GrLivArea2:Neighborhood_StoneBr   -227680.1484  -85192.4124
## GrLivArea:Neighborhood_Somerst      56343.2207  145745.5702
## GrLivArea2:Neighborhood_Somerst   -159290.5022  -54417.7838
## BedroomAbvGr:Neighborhood_Veenker  -26842.9259   -4500.8692
## Neighborhood_Edwards:LotArea         9651.1638   42468.2250
## GrLivArea2:Neighborhood_MeadowV    -40193.6144  -10610.6314
## GrLivArea:Neighborhood_Mitchel     -27328.9269   -8148.8857
## BedroomAbvGr:Neighborhood_Crawfor  -22483.2279   -5322.1744
## GrLivArea:Neighborhood_NWAmes      -21445.8634   -6171.5268
## GrLivArea:Neighborhood_CollgCr     -20511.0177   -6143.4566
## BedroomAbvGr:Neighborhood_SawyerW  -16133.9532   -1933.7631
## LotArea:Neighborhood_StoneBr          570.8653   37625.5475
## BedroomAbvGr:Neighborhood_CollgCr    6706.6155   23970.2298
## LotArea:Neighborhood_CollgCr       -52620.8471   -8074.5244
## Neighborhood_NAmes:BedroomAbvGr      1489.7384   10885.9918
## GrLivArea:HouseStyle_1Story           682.6686    8755.8093
## BedroomAbvGr:SaleCondition_Family  -19791.2882    -272.9981
ols_plot_cooksd_bar(stepwise_model)

stepwise_model_outliers = ols_plot_cooksd_bar(stepwise_model, print_plot=F)
stepwise_model_outliers
## $plot

## 
## $outliers
##      observation cooks_distance
## 54            54    0.003424118
## 57            57    0.003417283
## 59            59    0.034567670
## 66            66    0.003084555
## 113          113    0.010637004
## 121          121    0.003376605
## 138          138    0.012000231
## 140          140    0.004874205
## 152          152    0.005109488
## 162          162    0.004442632
## 179          179    0.028274100
## 182          182    0.004318679
## 186          186    0.004878066
## 194          194    0.004871377
## 198          198    0.011834835
## 219          219    0.002967086
## 225          225    0.006470847
## 250          250    0.004535112
## 252          252    0.004005638
## 262          262    0.010262073
## 309          309    0.003118864
## 314          314    0.006627558
## 321          321    0.004223226
## 322          322    0.006157009
## 327          327    0.006239055
## 331          331    0.005091024
## 336          336    0.012277001
## 337          337    0.003409599
## 350          350    0.008292633
## 378          378    0.011620101
## 379          379    0.003365383
## 384          384    0.003623813
## 385          385    0.018198903
## 401          401    0.004665185
## 441          441    0.007665139
## 455          455    0.004736671
## 458          458    0.005446310
## 463          463    0.002833939
## 474          474    0.015832401
## 478          478    0.015231061
## 524          524    0.058898132
## 530          530    0.009693533
## 564          564    0.008013535
## 567          567    0.036382417
## 569          569    0.003194339
## 582          582    0.005228881
## 586          586    0.003448814
## 589          589    0.004583939
## 608          608    0.003950282
## 640          640    0.006416087
## 641          641    0.015428895
## 643          643    0.004177815
## 662          662    0.003061214
## 665          665    0.017927463
## 667          667    0.006604353
## 679          679    0.003667772
## 686          686    0.018768542
## 689          689    0.013728323
## 692          692    0.007509322
## 703          703    0.006353158
## 717          717    0.003383937
## 729          729    0.003230014
## 770          770    0.910876290
## 775          775    0.005274250
## 799          799    0.008670202
## 804          804    0.046980885
## 826          826    0.009564353
## 848          848    0.002843342
## 876          876    0.010420387
## 878          878    0.003924355
## 899          899    0.059661034
## 927          927    0.005289654
## 962          962    0.003972979
## 964          964    0.003325451
## 992          992    0.012418308
## 1025        1025    0.044414015
## 1032        1032    0.026787007
## 1047        1047    0.138234692
## 1063        1063    0.007886114
## 1066        1066    0.025249841
## 1069        1069    0.014871703
## 1089        1089    0.003367255
## 1098        1098    0.006801326
## 1143        1143    0.042959293
## 1152        1152    0.003033520
## 1170        1170    0.101097838
## 1174        1174    0.069988232
## 1176        1176    0.006374889
## 1182        1182    0.021885119
## 1299        1299    0.106091051
## 1305        1305    0.004536679
## 1311        1311    0.003148832
## 1325        1325    0.026341134
## 1327        1327    0.014626298
## 1328        1328    0.003332240
## 1329        1329    0.013142841
## 1350        1350    0.004084784
## 1360        1360    0.007243901
## 1377        1377    0.003271833
## 1389        1389    0.004082432
## 1416        1416    0.008016896
## 1424        1424    0.010158142
## 1441        1441    0.003939772
## 1458        1458    0.005235545
## 
## $threshold
## [1] 0.002739726
ols_plot_dffits(stepwise_model)

ols_plot_diagnostics(stepwise_model)

ols_plot_resid_fit(stepwise_model)

ols_plot_resid_pot(stepwise_model)

ols_pred_rsq(stepwise_model)
## [1] 0.876222
plot(stepwise_fit)

stepwise_predictions = c(predict(stepwise_model, newdata = one_encode_test_data_q2))
one_encode_test_data_q2[1117,]
##      Id GrLivArea Neighborhood_Blmngtn Neighborhood_Blueste Neighborhood_BrDale
## 1: 2577  0.594763                    0                    0                   0
##    Neighborhood_BrkSide Neighborhood_ClearCr Neighborhood_CollgCr
## 1:                    0                    0                    0
##    Neighborhood_Crawfor Neighborhood_Edwards Neighborhood_Gilbert
## 1:                    0                    0                    0
##    Neighborhood_IDOTRR Neighborhood_MeadowV Neighborhood_Mitchel
## 1:                   1                    0                    0
##    Neighborhood_NAmes Neighborhood_NoRidge Neighborhood_NPkVill
## 1:                  0                    0                    0
##    Neighborhood_NridgHt Neighborhood_NWAmes Neighborhood_OldTown
## 1:                    0                   0                    0
##    Neighborhood_Sawyer Neighborhood_SawyerW Neighborhood_Somerst
## 1:                   0                    0                    0
##    Neighborhood_StoneBr Neighborhood_SWISU Neighborhood_Timber
## 1:                    0                  0                   0
##    Neighborhood_Veenker    LotArea     YrSold SaleCondition_Abnorml
## 1:                    0 -0.1459563 -0.6142282                     0
##    SaleCondition_AdjLand SaleCondition_Alloca SaleCondition_Family
## 1:                     0                    1                    0
##    SaleCondition_Normal SaleCondition_Partial HouseStyle_1.5Fin
## 1:                    0                     0                 0
##    HouseStyle_1.5Unf HouseStyle_1Story HouseStyle_2.5Unf HouseStyle_2Story
## 1:                 0                 0                 0                 1
##    HouseStyle_SFoyer HouseStyle_SLvl KitchenQual_Ex KitchenQual_Fa
## 1:                 0               0              0              0
##    KitchenQual_Gd KitchenQual_TA YearRemodAdd GarageCars    PoolArea Fireplaces
## 1:              1              0    0.6846194  0.3116179 -0.06866822 -0.9509007
##    BsmtFullBath BsmtHalfBath FullBath   HalfBath BedroomAbvGr  Remodel
## 1:   -0.8196835   -0.2409785  0.78947 -0.7613598     0.163723 1.047353
##    OverallQual GrLivArea2  X1stFlrSF X2ndFlrSF
## 1:  -0.7948791  0.3725528 -0.5707028  1.234759
stepwise_submission = data.frame(Id= one_encode_test_data_q2$Id, SalePrice=stepwise_predictions)

#write_csv(stepwise_submission, "../kaggleData/stepwiseSelectionPredictions.csv")

nrow(stepwise_submission)
## [1] 1459
sum(is.na(stepwise_submission))
## [1] 0
stepwise_submission_na <- stepwise_submission %>% filter_all(any_vars(is.na(.))) 
#stepwise_submission_na
step_wise_vif = VIF(stepwise_model)
step_wise_vif
##                       OverallQual                    KitchenQual_Ex 
##                          2.686324                          2.404222 
##                        GrLivArea2                          FullBath 
##                         14.229804                          2.160256 
##                        GarageCars                         X2ndFlrSF 
##                          1.855607                          2.536711 
##              Neighborhood_NoRidge   Neighborhood_Edwards:GrLivArea2 
##                          1.653323                         22.013318 
##      LotArea:SaleCondition_Normal          KitchenQual_Ex:GrLivArea 
##                          1.246355                          5.688962 
##         GrLivArea2:KitchenQual_Gd     GrLivArea2:Neighborhood_NAmes 
##                         36.229746                          2.011046 
##    Neighborhood_Edwards:GrLivArea   GrLivArea2:Neighborhood_OldTown 
##                         11.853224                          1.836562 
##      LotArea:Neighborhood_OldTown      LotArea:Neighborhood_NridgHt 
##                          1.434400                          1.744916 
##    GrLivArea:Neighborhood_StoneBr          GrLivArea:KitchenQual_Gd 
##                         70.081526                         35.755873 
##    GrLivArea:Neighborhood_NridgHt Neighborhood_NridgHt:BedroomAbvGr 
##                          2.288855                          1.613838 
##     GrLivArea2:Neighborhood_SWISU    BedroomAbvGr:HouseStyle_1Story 
##                          1.330747                          2.313584 
##    GrLivArea2:Neighborhood_Sawyer       KitchenQual_Gd:BedroomAbvGr 
##                          1.241526                          2.539048 
## BedroomAbvGr:Neighborhood_Blmngtn         LotArea:HouseStyle_2Story 
##                          1.171572                          1.875462 
##   GrLivArea2:Neighborhood_ClearCr    GrLivArea:Neighborhood_ClearCr 
##                         34.687088                         35.058026 
##   GrLivArea2:Neighborhood_StoneBr    GrLivArea:Neighborhood_Somerst 
##                         81.702668                         21.188865 
##   GrLivArea2:Neighborhood_Somerst BedroomAbvGr:Neighborhood_Veenker 
##                         21.060162                          1.160355 
##      Neighborhood_Edwards:LotArea   GrLivArea2:Neighborhood_MeadowV 
##                          4.887814                          1.093741 
##    GrLivArea:Neighborhood_Mitchel BedroomAbvGr:Neighborhood_Crawfor 
##                          1.127053                          1.128623 
##     GrLivArea:Neighborhood_NWAmes    GrLivArea:Neighborhood_CollgCr 
##                          1.217707                          1.921416 
## BedroomAbvGr:Neighborhood_SawyerW      LotArea:Neighborhood_StoneBr 
##                          1.118426                          2.989637 
## BedroomAbvGr:Neighborhood_CollgCr      LotArea:Neighborhood_CollgCr 
##                          2.333567                          1.706190 
##   Neighborhood_NAmes:BedroomAbvGr       GrLivArea:HouseStyle_1Story 
##                          1.725506                          2.628738 
## BedroomAbvGr:SaleCondition_Family 
##                          1.052341
#Forward Selection
fw_fit = ols_step_forward_p(lm_fit_q2, penter=0.05, details = F)
fw_fit
## 
##                                             Selection Summary                                              
## ----------------------------------------------------------------------------------------------------------
##         Variable                                           Adj.                                               
## Step                 Entered                 R-Square    R-Square      C(p)          AIC           RMSE       
## ----------------------------------------------------------------------------------------------------------
##    1    OverallQual                            0.6257      0.6254    5473.2779    35659.4925    48622.7618    
##    2    GrLivArea                              0.7142      0.7138    3836.7257    35267.5843    42501.3029    
##    3    KitchenQual_Ex                         0.7408      0.7403    3345.2535    35126.6329    40484.6177    
##    4    Neighborhood_Edwards:GrLivArea2        0.7708      0.7702    2791.6901    34948.9336    38081.3527    
##    5    X1stFlrSF                              0.7959      0.7952    2330.3784    34782.0599    35953.8101    
##    6    GrLivArea2                             0.8058      0.8050    2149.3761    34711.5763    35084.3755    
##    7    Neighborhood_Edwards                   0.8130      0.8121    2017.7555    34658.2821    34438.1082    
##    8    YearRemodAdd                           0.8254      0.8245    1789.4410    34559.7645    33284.2523    
##    9    LotArea                                0.8351      0.8340    1613.1585    34478.9072    32364.2143    
##   10    X2ndFlrSF                              0.8397      0.8386    1529.3023    34439.2630    31916.9289    
##   11    HalfBath                               0.8423      0.8411    1482.2058    34416.9041    31662.7094    
##   12    SaleCondition_Abnorml                  0.8447      0.8434    1440.0614    34396.6495    31433.1676    
##   13    SaleCondition_Normal                   0.8469      0.8456    1401.3480    34377.8196    31220.5256    
##   14    BsmtFullBath                           0.8552      0.8538    1250.7941    34299.0144    30378.9110    
##   15    GarageCars                             0.8621      0.8607    1123.6610    34228.9364    29648.4702    
##   16    SaleCondition_Alloca                   0.8636      0.8621    1098.0922    34215.0763    29498.0859    
##   17    SaleCondition_Family                   0.8659      0.8643    1057.7211    34192.3597    29259.5912    
##   18    KitchenQual_Gd                         0.8672      0.8655    1036.2698    34180.4977    29131.1198    
##   19    HouseStyle_1.5Unf                      0.8676      0.8659    1029.8841    34177.5088    29091.4870    
##   20    Neighborhood_OldTown                   0.8710      0.8692     970.2508    34142.3087    28733.1979    
##   21    SaleCondition_AdjLand                  0.8714      0.8695     964.7988    34139.7460    28698.3086    
##   22    Fireplaces                             0.8724      0.8705     947.4789    34129.8499    28591.5727    
##   23    PoolArea                               0.8726      0.8706     945.3915    34129.3207    28576.7632    
##   24    Neighborhood_Crawfor                   0.8736      0.8715     928.7841    34119.7509    28473.6741    
##   25    Neighborhood_NWAmes                    0.8743      0.8721     918.7325    34114.2081    28410.1187    
##   26    FullBath                               0.8746      0.8723     915.6141    34112.9928    28388.7528    
##   27    BedroomAbvGr                           0.8753      0.8730     903.3285    34105.9813    28311.1561    
##   28    Neighborhood_Blmngtn                   0.8764      0.8740     886.2433    34095.8546    28203.6737    
##   29    Neighborhood_MeadowV                   0.8766      0.8741     883.5692    34094.8692    28184.7030    
##   30    Neighborhood_Veenker                   0.8769      0.8743     881.1155    34094.0190    28167.0556    
##   31    Neighborhood_NridgHt                   0.8792      0.8766     839.1673    34067.5909    27903.9262    
##   32    HouseStyle_2.5Unf                      0.8796      0.8769     834.0454    34064.9314    27869.1954    
##   33    Neighborhood_SawyerW                   0.8799      0.8771     831.7534    34064.1162    27852.1002    
##   34    Neighborhood_Mitchel                   0.8800      0.8772     830.4278    34063.9312    27841.0298    
##   35    Neighborhood_NAmes                     0.8803      0.8774     827.5595    34062.7266    27820.2550    
##   36    Neighborhood_Timber                    0.8804      0.8774     827.9810    34063.6860    27820.1129    
##   37    Neighborhood_Sawyer                    0.8805      0.8774     827.4939    34064.0450    27814.2575    
##   38    KitchenQual_Fa                         0.8806      0.8774     828.4022    34065.3241    27817.1744    
##   39    Neighborhood_CollgCr                   0.8808      0.8775     827.1447    34065.1709    27806.4551    
##   40    Neighborhood_BrDale                    0.8813      0.8779     819.7719    34060.9577    27757.1264    
##   41    Remodel                                0.8813      0.8779     821.3219    34062.6587    27764.0692    
##   42    HouseStyle_SFoyer                      0.8813      0.8778     822.9353    34064.4018    27771.4213    
##   43    Neighborhood_ClearCr                   0.8813      0.8777     824.8142    34066.3213    27780.4600    
##   44    YrSold                                 0.8813      0.8776     826.6516    34068.2132    27789.2459    
##   45    Neighborhood_NPkVill                   0.8815      0.8777     825.3020    34067.9853    27777.8680    
##   46    Neighborhood_Blueste                   0.8816      0.8778     825.2942    34068.6481    27774.9738    
##   47    Neighborhood_Somerst                   0.8817      0.8777     826.2847    34069.9754    27778.4067    
##   48    Neighborhood_StoneBr                   0.8832      0.8792     800.2803    34053.1879    27610.0304    
##   49    BsmtHalfBath                           0.8837      0.8797     791.9990    34048.2292    27554.0775    
##   50    Neighborhood_SWISU                     0.8841      0.8800     786.9608    34045.4464    27518.7424    
##   51    Neighborhood_IDOTRR                    0.8845      0.8803     782.3923    34042.9686    27486.3300    
##   52    HouseStyle_1.5Fin                      0.8845      0.8802     784.3815    34044.9612    27496.0268    
##   53    Neighborhood_Gilbert                   0.8857      0.8813     764.5766    34031.9973    27365.2066    
##   54    HouseStyle_1Story                      0.8857      0.8813     766.3270    34033.8251    27373.3294    
##   55    HouseStyle_2Story                      0.8857      0.8812     768.1412    34035.6969    27381.8738    
##   56    Neighborhood_NoRidge                   0.8876      0.8831     734.6049    34012.9710    27160.6628    
##   57    GrLivArea:Neighborhood_Edwards         0.8941      0.8898     616.1001    33927.8628    26371.7844    
##   58    Neighborhood_NAmes:GrLivArea2          0.8983      0.8941     540.5172    33870.8997    25853.8248    
##   59    Neighborhood_NridgHt:LotArea           0.9017      0.8976     478.8956    33822.7044    25422.2664    
##   60    KitchenQual_Ex:GrLivArea2              0.9046      0.9005     427.9449    33781.5707    25058.4445    
##   61    GrLivArea:KitchenQual_Gd               0.9087      0.9047     354.0428    33719.4300    24522.7779    
##   62    LotArea:HouseStyle_2Story              0.9101      0.9061     330.2684    33698.9924    24343.7723    
##   63    Neighborhood_NridgHt:BedroomAbvGr      0.9115      0.9075     306.5340    33678.2402    24163.4763    
##   64    GrLivArea:Neighborhood_OldTown         0.9125      0.9085     289.2660    33662.9698    24029.5914    
##   65    Neighborhood_ClearCr:GrLivArea2        0.9134      0.9093     275.4025    33650.5961    23920.1713    
##   66    GrLivArea:Neighborhood_NridgHt         0.9141      0.9101     263.2695    33639.6701    23823.0640    
##   67    GrLivArea:HouseStyle_1Story            0.9149      0.9108     251.5190    33628.9831    23728.2989    
##   68    GrLivArea:Neighborhood_Sawyer          0.9156      0.9115     240.2162    33618.6033    23636.4037    
##   69    GrLivArea:SaleCondition_Abnorml        0.9163      0.9122     228.8379    33608.0465    23543.4436    
##   70    Neighborhood_Edwards:LotArea           0.9169      0.9127     219.7528    33599.5596    23467.4842    
##   71    GrLivArea:Neighborhood_ClearCr         0.9174      0.9132     212.2749    33592.5332    23403.4782    
##   72    Neighborhood_Somerst:LotArea           0.9180      0.9137     204.2050    33584.8813    23334.6548    
##   73    GrLivArea:Neighborhood_StoneBr         0.9186      0.9143     195.4693    33576.5205    23260.3917    
##   74    Neighborhood_NAmes:BedroomAbvGr        0.9191      0.9148     187.6069    33568.9373    23192.5462    
##   75    Neighborhood_Crawfor:LotArea           0.9195      0.9151     182.9270    33564.4106    23149.1232    
##   76    Neighborhood_SWISU:LotArea             0.9198      0.9154     178.5484    33560.1508    23107.9003    
##   77    Neighborhood_NWAmes:GrLivArea2         0.9201      0.9157     174.2933    33555.9862    23067.5077    
##   78    Neighborhood_StoneBr:GrLivArea2        0.9205      0.9160     170.3642    33552.1187    23029.5354    
##   79    Neighborhood_Veenker:BedroomAbvGr      0.9208      0.9162     166.6129    33548.4045    22992.8392    
##   80    SaleCondition_Family:GrLivArea2        0.9211      0.9165     162.8042    33544.6105    22955.5796    
##   81    GrLivArea:SaleCondition_Normal         0.9216      0.9170     154.6565    33536.4331    22884.0079    
##   82    LotArea:SaleCondition_Normal           0.9223      0.9176     145.1691    33526.8256    22801.4960    
##   83    Neighborhood_StoneBr:LotArea           0.9226      0.9179     140.7790    33522.3286    22759.0845    
##   84    Neighborhood_SawyerW:BedroomAbvGr      0.9229      0.9182     137.3631    33518.7994    22724.2880    
##   85    Neighborhood_SawyerW:LotArea           0.9231      0.9184     134.9709    33516.2998    22697.5534    
##   86    Neighborhood_NridgHt:GrLivArea2        0.9234      0.9186     132.5655    33513.7727    22670.6419    
## ----------------------------------------------------------------------------------------------------------
fw_model = fw_fit$model
ols_press(fw_model)
## [1] 1.041275e+12
summary(fw_model)
## 
## Call:
## lm(formula = paste(response, "~", paste(preds, collapse = " + ")), 
##     data = l)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -141057  -11405    -287   11434  136612 
## 
## Coefficients:
##                                     Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                        186591.14    5667.99  32.920  < 2e-16 ***
## OverallQual                         17977.77    1153.01  15.592  < 2e-16 ***
## GrLivArea                           -4371.79    9508.14  -0.460 0.645737    
## KitchenQual_Ex                      20637.87    3811.19   5.415 7.22e-08 ***
## X1stFlrSF                           10549.97    5905.88   1.786 0.074263 .  
## GrLivArea2                          36229.98    5328.05   6.800 1.56e-11 ***
## Neighborhood_Edwards               -20343.77    4319.11  -4.710 2.73e-06 ***
## YearRemodAdd                         5154.81     961.77   5.360 9.77e-08 ***
## LotArea                            -11225.47    4269.94  -2.629 0.008660 ** 
## X2ndFlrSF                            6486.37    6635.38   0.978 0.328473    
## HalfBath                             3722.87     948.65   3.924 9.13e-05 ***
## SaleCondition_Abnorml              -23992.78    3603.68  -6.658 4.01e-11 ***
## SaleCondition_Normal                -9896.37    2719.59  -3.639 0.000284 ***
## BsmtFullBath                         7209.98     698.80  10.318  < 2e-16 ***
## GarageCars                           5374.15     875.85   6.136 1.11e-09 ***
## SaleCondition_Alloca               -23737.09    7946.10  -2.987 0.002865 ** 
## SaleCondition_Family               -24211.68    5879.22  -4.118 4.05e-05 ***
## KitchenQual_Gd                       6017.40    1873.06   3.213 0.001346 ** 
## HouseStyle_1.5Unf                  -14790.16    6538.27  -2.262 0.023848 *  
## Neighborhood_OldTown               -18854.37    3905.72  -4.827 1.54e-06 ***
## SaleCondition_AdjLand              -10580.85   12413.09  -0.852 0.394144    
## Fireplaces                           3429.91     785.98   4.364 1.37e-05 ***
## PoolArea                             1807.62     700.72   2.580 0.009993 ** 
## Neighborhood_Crawfor                15881.79    4791.90   3.314 0.000943 ***
## Neighborhood_NWAmes                 -7227.91    4904.53  -1.474 0.140786    
## FullBath                             4394.11    1071.94   4.099 4.39e-05 ***
## BedroomAbvGr                        -2805.50     991.46  -2.830 0.004727 ** 
## Neighborhood_Blmngtn               -15564.73    7037.50  -2.212 0.027153 *  
## Neighborhood_MeadowV               -16406.85    6964.47  -2.356 0.018623 *  
## Neighborhood_Veenker                11389.61    9138.70   1.246 0.212865    
## Neighborhood_NridgHt                  470.84    8475.31   0.056 0.955705    
## HouseStyle_2.5Unf                  -12582.94    8437.83  -1.491 0.136125    
## Neighborhood_SawyerW                -3548.80    4902.61  -0.724 0.469274    
## Neighborhood_Mitchel                -5291.28    4866.02  -1.087 0.277054    
## Neighborhood_NAmes                 -12904.08    4010.74  -3.217 0.001324 ** 
## Neighborhood_Timber                  5442.90    5595.67   0.973 0.330875    
## Neighborhood_Sawyer                -11903.26    5120.06  -2.325 0.020226 *  
## KitchenQual_Fa                      -3599.68    4049.55  -0.889 0.374208    
## Neighborhood_CollgCr                 3047.51    4327.02   0.704 0.481367    
## Neighborhood_BrDale                -16100.29    7420.49  -2.170 0.030200 *  
## Remodel                               610.47     753.24   0.810 0.417822    
## HouseStyle_SFoyer                   -5751.20    5201.78  -1.106 0.269084    
## Neighborhood_ClearCr                  -30.65    7005.69  -0.004 0.996510    
## YrSold                                178.16     621.83   0.287 0.774526    
## Neighborhood_NPkVill                -8657.43    8718.03  -0.993 0.320861    
## Neighborhood_Blueste               -12640.90   16742.66  -0.755 0.450372    
## Neighborhood_Somerst                18648.95    5299.38   3.519 0.000447 ***
## Neighborhood_StoneBr                16687.76    8091.49   2.062 0.039359 *  
## BsmtHalfBath                         2599.63     637.04   4.081 4.75e-05 ***
## Neighborhood_SWISU                 -24191.16    7905.35  -3.060 0.002256 ** 
## Neighborhood_IDOTRR                 -9957.85    4850.09  -2.053 0.040249 *  
## HouseStyle_1.5Fin                   -5288.86    4161.62  -1.271 0.203992    
## Neighborhood_Gilbert                -1750.65    4881.52  -0.359 0.719929    
## HouseStyle_1Story                    6315.81    3515.37   1.797 0.072615 .  
## HouseStyle_2Story                   -4901.12    4441.88  -1.103 0.270052    
## Neighborhood_NoRidge                21831.88    6035.21   3.617 0.000308 ***
## Neighborhood_Edwards:GrLivArea2   -128894.26    7466.60 -17.263  < 2e-16 ***
## GrLivArea:Neighborhood_Edwards      81483.40    7627.21  10.683  < 2e-16 ***
## GrLivArea2:Neighborhood_NAmes      -25817.50    3335.66  -7.740 1.92e-14 ***
## LotArea:Neighborhood_NridgHt        49874.20   10424.32   4.784 1.90e-06 ***
## KitchenQual_Ex:GrLivArea2           22121.24    2654.50   8.333  < 2e-16 ***
## GrLivArea:KitchenQual_Gd            11293.38    1768.37   6.386 2.32e-10 ***
## LotArea:HouseStyle_2Story           10668.91    2579.37   4.136 3.74e-05 ***
## BedroomAbvGr:Neighborhood_NridgHt  -24571.00    4024.93  -6.105 1.34e-09 ***
## GrLivArea:Neighborhood_OldTown      -9823.07    2414.57  -4.068 5.01e-05 ***
## GrLivArea2:Neighborhood_ClearCr   -116966.41   31172.40  -3.752 0.000183 ***
## GrLivArea:Neighborhood_NridgHt      79458.36   31081.30   2.556 0.010681 *  
## GrLivArea:HouseStyle_1Story         10357.40    2666.85   3.884 0.000108 ***
## GrLivArea:Neighborhood_Sawyer      -14464.16    4388.38  -3.296 0.001006 ** 
## GrLivArea:SaleCondition_Abnorml    -18657.87    3392.82  -5.499 4.54e-08 ***
## Neighborhood_Edwards:LotArea        25392.63    7486.08   3.392 0.000714 ***
## GrLivArea:Neighborhood_ClearCr      97360.99   30732.97   3.168 0.001569 ** 
## LotArea:Neighborhood_Somerst        27223.74    7361.78   3.698 0.000226 ***
## GrLivArea:Neighborhood_StoneBr     127264.76   34558.29   3.683 0.000240 ***
## BedroomAbvGr:Neighborhood_NAmes      6244.38    2192.65   2.848 0.004467 ** 
## LotArea:Neighborhood_Crawfor       -14460.82    6599.07  -2.191 0.028595 *  
## LotArea:Neighborhood_SWISU         -47501.11   19670.33  -2.415 0.015871 *  
## GrLivArea2:Neighborhood_NWAmes      -8161.62    3744.93  -2.179 0.029473 *  
## GrLivArea2:Neighborhood_StoneBr   -120493.92   33852.61  -3.559 0.000384 ***
## BedroomAbvGr:Neighborhood_Veenker  -14205.71    5631.45  -2.523 0.011762 *  
## GrLivArea2:SaleCondition_Family    -35770.42    8932.57  -4.004 6.55e-05 ***
## GrLivArea:SaleCondition_Normal     -14189.79    2867.53  -4.948 8.41e-07 ***
## LotArea:SaleCondition_Normal        15625.22    4228.52   3.695 0.000228 ***
## LotArea:Neighborhood_StoneBr        21397.25    8396.53   2.548 0.010932 *  
## BedroomAbvGr:Neighborhood_SawyerW   -8101.24    3211.63  -2.522 0.011766 *  
## LotArea:Neighborhood_SawyerW        28939.52   13858.16   2.088 0.036958 *  
## GrLivArea2:Neighborhood_NridgHt    -59334.50   28734.21  -2.065 0.039116 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 22670 on 1373 degrees of freedom
## Multiple R-squared:  0.9234, Adjusted R-squared:  0.9186 
## F-statistic: 192.4 on 86 and 1373 DF,  p-value: < 2.2e-16
#confint(fw_model)
ols_plot_cooksd_bar(fw_model)

fw_model_outliers = ols_plot_cooksd_bar(fw_model, print_plot=F)
fw_model_outliers
## $plot

## 
## $outliers
##      observation cooks_distance
## 4              4    0.005533118
## 54            54    0.010746806
## 59            59    0.005238746
## 66            66    0.004100509
## 67            67    0.002761712
## 94            94    0.004112057
## 119          119    0.003868737
## 121          121    0.003813257
## 138          138    0.003791780
## 152          152    0.003017754
## 154          154    0.008710362
## 179          179    0.023094033
## 186          186    0.016931834
## 198          198    0.003670850
## 209          209    0.005079675
## 219          219    0.008497165
## 239          239    0.002934549
## 250          250    0.004648572
## 252          252    0.005563674
## 262          262    0.021083067
## 305          305    0.007005313
## 314          314    0.011739197
## 321          321    0.005021460
## 322          322    0.004563020
## 331          331    0.007019326
## 336          336    0.013866443
## 337          337    0.003952685
## 349          349    0.006958734
## 350          350    0.014583288
## 363          363    0.004390628
## 384          384    0.005134576
## 385          385    0.034711374
## 401          401    0.007905583
## 427          427    0.003451913
## 439          439    0.003413496
## 441          441    0.019612428
## 474          474    0.008830652
## 478          478    0.005869326
## 497          497    0.003043277
## 524          524    0.027070590
## 528          528    0.003629215
## 530          530    0.090047375
## 560          560    0.003068195
## 567          567    0.013019190
## 569          569    0.005044630
## 582          582    0.013907228
## 584          584    0.005071135
## 586          586    0.003004760
## 589          589    0.032720644
## 592          592    0.004517492
## 598          598    0.004076096
## 608          608    0.006600237
## 622          622    0.002808332
## 633          633    0.014846022
## 636          636    0.007576615
## 641          641    0.006744594
## 643          643    0.006211303
## 662          662    0.004329263
## 665          665    0.012379338
## 682          682    0.005322280
## 686          686    0.013466435
## 689          689    0.046788721
## 692          692    0.015037115
## 703          703    0.008910781
## 708          708    0.002836577
## 725          725    0.003145896
## 745          745    0.004953820
## 770          770    2.640476866
## 775          775    0.005432577
## 779          779    0.003153920
## 799          799    0.025431115
## 804          804    0.069862122
## 811          811    0.010015936
## 813          813    0.003911426
## 823          823    0.003606640
## 826          826    0.008774138
## 841          841    0.011904950
## 849          849    0.002830065
## 876          876    0.013493753
## 878          878    0.006064137
## 886          886    0.006904558
## 898          898    0.005163716
## 899          899    0.048427724
## 926          926    0.004778653
## 940          940    0.005305586
## 962          962    0.006750628
## 971          971    0.003034035
## 1025        1025    0.024891894
## 1032        1032    0.041838065
## 1045        1045    0.003234651
## 1047        1047    0.105686305
## 1049        1049    0.004466601
## 1063        1063    0.003789691
## 1066        1066    0.016466571
## 1069        1069    0.007417611
## 1098        1098    0.006767925
## 1128        1128    0.005261062
## 1143        1143    0.006505510
## 1156        1156    0.003001716
## 1169        1169    0.006712115
## 1170        1170    0.062496248
## 1174        1174    0.889937281
## 1176        1176    0.005834351
## 1182        1182    0.021811805
## 1183        1183    0.004273060
## 1217        1217    0.002792937
## 1268        1268    0.005726221
## 1269        1269    0.004787238
## 1285        1285    0.004703839
## 1299        1299    0.058336041
## 1311        1311    0.004598502
## 1323        1323    0.003271351
## 1325        1325    0.013822419
## 1327        1327    0.003884424
## 1329        1329    0.013648957
## 1360        1360    0.007955172
## 1387        1387    0.042004098
## 1389        1389    0.007982085
## 1397        1397    0.003183311
## 1416        1416    0.002891932
## 1424        1424    0.115566224
## 1441        1441    0.003717308
## 
## $threshold
## [1] 0.002739726
ols_plot_dffits(fw_model)

ols_plot_diagnostics(fw_model)

ols_plot_resid_fit(fw_model)

ols_plot_resid_pot(fw_model)

ols_pred_rsq(fw_model)
## [1] 0.8869152
plot(fw_fit)

fw_predictions = c(predict(fw_model, newdata = one_encode_test_data_q2))


fw_submission = data.frame(Id= one_encode_test_data_q2$Id, SalePrice=fw_predictions)
fw_submission
##        Id SalePrice
## 1    1461 111934.73
## 2    1462 148895.38
## 3    1463 165887.63
## 4    1464 178837.89
## 5    1465 190807.69
## 6    1466 171021.37
## 7    1467 171346.10
## 8    1468 162192.44
## 9    1469 198932.63
## 10   1470 120559.16
## 11   1471 191561.45
## 12   1472  99310.75
## 13   1473  85077.40
## 14   1474 145583.23
## 15   1475 123529.72
## 16   1476 400715.02
## 17   1477 248185.41
## 18   1478 286493.07
## 19   1479 309104.25
## 20   1480 489673.07
## 21   1481 339637.91
## 22   1482 213011.66
## 23   1483 169905.31
## 24   1484 152344.55
## 25   1485 199650.29
## 26   1486 197926.12
## 27   1487 315616.74
## 28   1488 248235.28
## 29   1489 197228.96
## 30   1490 221032.07
## 31   1491 193915.83
## 32   1492 115224.51
## 33   1493 170909.19
## 34   1494 306090.50
## 35   1495 296074.07
## 36   1496 219195.85
## 37   1497 186388.48
## 38   1498 157377.08
## 39   1499 169899.91
## 40   1500 157255.14
## 41   1501 173389.09
## 42   1502 147891.17
## 43   1503 265397.35
## 44   1504 242791.01
## 45   1505 224155.42
## 46   1506 190738.84
## 47   1507 238772.34
## 48   1508 188254.38
## 49   1509 149816.94
## 50   1510 152526.39
## 51   1511 144703.83
## 52   1512 166375.79
## 53   1513 129831.46
## 54   1514 169831.75
## 55   1515 160502.37
## 56   1516 147433.01
## 57   1517 155337.09
## 58   1518 150501.06
## 59   1519 201981.35
## 60   1520 133395.54
## 61   1521 122162.40
## 62   1522 183609.05
## 63   1523  96226.84
## 64   1524 120302.85
## 65   1525 115935.25
## 66   1526 113477.28
## 67   1527 126718.83
## 68   1528 149839.76
## 69   1529 134909.98
## 70   1530 169077.55
## 71   1531 111004.51
## 72   1532 110419.96
## 73   1533 144021.47
## 74   1534 116124.10
## 75   1535 131882.70
## 76   1536 100695.43
## 77   1537  69748.66
## 78   1538 153578.13
## 79   1539 218341.18
## 80   1540  95907.87
## 81   1541 140699.52
## 82   1542 140094.09
## 83   1543 206611.51
## 84   1544  90327.49
## 85   1545 129057.60
## 86   1546 155901.44
## 87   1547 137676.30
## 88   1548 131919.48
## 89   1549 118346.10
## 90   1550 134273.43
## 91   1551 135047.88
## 92   1552 111256.71
## 93   1553 137298.68
## 94   1554 117990.65
## 95   1555 186191.04
## 96   1556 131282.29
## 97   1557 103362.44
## 98   1558 109380.96
## 99   1559  95377.85
## 100  1560 157318.40
## 101  1561 154286.89
## 102  1562 128767.41
## 103  1563 127973.96
## 104  1564 147343.31
## 105  1565 130176.80
## 106  1566 239304.06
## 107  1567 104268.96
## 108  1568 237600.96
## 109  1569 141581.25
## 110  1570 152786.32
## 111  1571 108979.97
## 112  1572 141310.90
## 113  1573 239019.50
## 114  1574 144910.52
## 115  1575 236248.33
## 116  1576 221192.99
## 117  1577 179540.91
## 118  1578 161452.13
## 119  1579 143822.50
## 120  1580 191836.50
## 121  1581 149698.40
## 122  1582 130095.21
## 123  1583 290034.54
## 124  1584 226109.07
## 125  1585 146868.75
## 126  1586  59439.96
## 127  1587  93619.00
## 128  1588 135598.21
## 129  1589  92292.19
## 130  1590 140072.25
## 131  1591  71660.19
## 132  1592 149582.15
## 133  1593 132184.32
## 134  1594 152781.52
## 135  1595 114092.60
## 136  1596 228213.94
## 137  1597 192437.70
## 138  1598 220445.42
## 139  1599 171084.19
## 140  1600 173065.48
## 141  1601  47636.42
## 142  1602 117604.89
## 143  1603  56371.96
## 144  1604 279009.12
## 145  1605 246435.26
## 146  1606 166817.90
## 147  1607 207095.73
## 148  1608 216105.51
## 149  1609 186500.89
## 150  1610 155447.09
## 151  1611 155537.63
## 152  1612 159533.15
## 153  1613 153537.77
## 154  1614 124116.31
## 155  1615  64283.82
## 156  1616  64923.93
## 157  1617  72599.47
## 158  1618 109565.31
## 159  1619 120133.34
## 160  1620 209075.55
## 161  1621 126413.35
## 162  1622 115805.24
## 163  1623 272300.46
## 164  1624 208446.83
## 165  1625 123873.21
## 166  1626 182837.58
## 167  1627 171217.16
## 168  1628 260482.25
## 169  1629 190804.44
## 170  1630 372943.31
## 171  1631 239220.36
## 172  1632 283715.40
## 173  1633 179527.36
## 174  1634 183896.63
## 175  1635 183665.26
## 176  1636 156781.63
## 177  1637 183325.07
## 178  1638 185264.26
## 179  1639 182278.97
## 180  1640 256787.58
## 181  1641 187419.69
## 182  1642 248874.76
## 183  1643 233503.64
## 184  1644 231433.01
## 185  1645 181018.85
## 186  1646 164094.17
## 187  1647 167166.43
## 188  1648 133260.94
## 189  1649 141748.60
## 190  1650 120560.22
## 191  1651 120852.20
## 192  1652 113570.42
## 193  1653 113320.73
## 194  1654 143335.68
## 195  1655 164597.69
## 196  1656 141313.17
## 197  1657 154807.96
## 198  1658 141585.50
## 199  1659 134456.04
## 200  1660 155866.00
## 201  1661 436608.18
## 202  1662 462543.95
## 203  1663 357395.31
## 204  1664 542690.61
## 205  1665 293550.93
## 206  1666 321077.03
## 207  1667 321750.56
## 208  1668 301989.09
## 209  1669 303592.82
## 210  1670 329578.94
## 211  1671 270425.53
## 212  1672 455388.24
## 213  1673 307016.95
## 214  1674 235897.63
## 215  1675 183543.64
## 216  1676 213269.90
## 217  1677 230912.21
## 218  1678 472054.37
## 219  1679 396814.56
## 220  1680 361107.08
## 221  1681 246971.20
## 222  1682 304544.50
## 223  1683 184637.43
## 224  1684 184322.60
## 225  1685 171764.82
## 226  1686 164344.33
## 227  1687 185389.07
## 228  1688 192443.71
## 229  1689 191856.84
## 230  1690 197463.45
## 231  1691 187471.39
## 232  1692 252890.24
## 233  1693 178729.35
## 234  1694 178431.15
## 235  1695 182404.21
## 236  1696 271615.95
## 237  1697 180975.89
## 238  1698 345282.05
## 239  1699 314833.82
## 240  1700 260509.75
## 241  1701 291509.98
## 242  1702 254795.68
## 243  1703 260891.45
## 244  1704 270946.70
## 245  1705 222663.95
## 246  1706 413506.81
## 247  1707 214719.95
## 248  1708 200775.44
## 249  1709 263905.42
## 250  1710 223721.19
## 251  1711 260743.11
## 252  1712 280291.82
## 253  1713 270553.04
## 254  1714 228037.35
## 255  1715 214046.60
## 256  1716 164764.87
## 257  1717 165636.39
## 258  1718 125110.73
## 259  1719 198060.71
## 260  1720 210408.62
## 261  1721 169361.41
## 262  1722 127509.06
## 263  1723 155503.29
## 264  1724 211694.39
## 265  1725 229435.11
## 266  1726 163514.37
## 267  1727 163702.27
## 268  1728 185024.28
## 269  1729 149669.59
## 270  1730 150573.90
## 271  1731 132855.39
## 272  1732 130138.26
## 273  1733 112747.25
## 274  1734 121810.18
## 275  1735 126129.54
## 276  1736 120331.49
## 277  1737 314991.14
## 278  1738 242534.76
## 279  1739 311087.37
## 280  1740 243283.84
## 281  1741 187629.05
## 282  1742 173331.21
## 283  1743 182186.64
## 284  1744 292786.26
## 285  1745 242685.95
## 286  1746 218648.89
## 287  1747 217760.77
## 288  1748 233096.70
## 289  1749 156506.74
## 290  1750 137018.69
## 291  1751 234737.74
## 292  1752 121549.21
## 293  1753 147416.79
## 294  1754 178285.03
## 295  1755 164067.73
## 296  1756 123071.32
## 297  1757 113317.42
## 298  1758 145407.64
## 299  1759 170703.64
## 300  1760 169717.01
## 301  1761 152225.05
## 302  1762 140003.12
## 303  1763 175801.38
## 304  1764 124726.23
## 305  1765 166282.52
## 306  1766 176039.23
## 307  1767 202111.02
## 308  1768 132848.52
## 309  1769 177208.21
## 310  1770 156925.81
## 311  1771 122536.52
## 312  1772 138549.23
## 313  1773 129504.74
## 314  1774 158547.97
## 315  1775 143199.69
## 316  1776 121843.48
## 317  1777 117105.37
## 318  1778 134635.72
## 319  1779 123287.74
## 320  1780 182019.71
## 321  1781 119142.32
## 322  1782  70116.61
## 323  1783 134401.49
## 324  1784  94595.22
## 325  1785 106900.87
## 326  1786 145516.75
## 327  1787 159808.91
## 328  1788  45977.48
## 329  1789  97683.22
## 330  1790  93203.46
## 331  1791 179300.56
## 332  1792 147474.23
## 333  1793 159953.49
## 334  1794 152041.43
## 335  1795 132051.75
## 336  1796 133616.93
## 337  1797 121439.42
## 338  1798 116493.89
## 339  1799 118236.79
## 340  1800 134412.93
## 341  1801 119771.79
## 342  1802 125272.84
## 343  1803 139617.65
## 344  1804 129670.21
## 345  1805 150303.44
## 346  1806 122220.20
## 347  1807 147921.80
## 348  1808 127414.37
## 349  1809 109951.82
## 350  1810 113421.35
## 351  1811  81573.49
## 352  1812  89624.06
## 353  1813 105843.23
## 354  1814  91901.69
## 355  1815  56808.69
## 356  1816  96683.71
## 357  1817 105256.43
## 358  1818 167000.82
## 359  1819 141112.60
## 360  1820  80021.72
## 361  1821 104033.01
## 362  1822 139927.63
## 363  1823  53222.27
## 364  1824 152734.44
## 365  1825 142912.25
## 366  1826 105210.50
## 367  1827 119140.22
## 368  1828 132730.68
## 369  1829 157154.52
## 370  1830 130495.13
## 371  1831 157417.45
## 372  1832  95464.53
## 373  1833 153955.68
## 374  1834 119340.37
## 375  1835 134091.92
## 376  1836 127732.57
## 377  1837  84272.18
## 378  1838 140848.40
## 379  1839 114262.90
## 380  1840 157919.84
## 381  1841 157169.97
## 382  1842 121702.05
## 383  1843 116104.43
## 384  1844 149874.44
## 385  1845 123589.35
## 386  1846 154614.96
## 387  1847 189713.51
## 388  1848  59175.65
## 389  1849 141924.07
## 390  1850 126514.54
## 391  1851 143922.51
## 392  1852 122650.86
## 393  1853 119831.44
## 394  1854 197697.99
## 395  1855 203242.11
## 396  1856 222695.79
## 397  1857 222470.02
## 398  1858 124884.34
## 399  1859 121896.47
## 400  1860 152717.61
## 401  1861 119849.01
## 402  1862 288581.93
## 403  1863 271315.98
## 404  1864 271479.12
## 405  1865 301971.89
## 406  1866 285989.20
## 407  1867 221554.83
## 408  1868 269531.63
## 409  1869 202862.61
## 410  1870 216750.86
## 411  1871 225921.58
## 412  1872 176626.34
## 413  1873 242539.07
## 414  1874 134331.42
## 415  1875 204586.12
## 416  1876 194163.98
## 417  1877 208077.86
## 418  1878 192575.40
## 419  1879 115579.77
## 420  1880 136551.88
## 421  1881 229198.58
## 422  1882 251789.54
## 423  1883 196449.19
## 424  1884 210566.38
## 425  1885 237665.46
## 426  1886 262587.12
## 427  1887 209521.12
## 428  1888 247315.18
## 429  1889 172277.02
## 430  1890 123451.00
## 431  1891 139415.74
## 432  1892  71884.06
## 433  1893 144994.61
## 434  1894 130605.15
## 435  1895 148135.13
## 436  1896 116219.81
## 437  1897 116748.10
## 438  1898 124711.96
## 439  1899 175984.58
## 440  1900 163978.25
## 441  1901 174197.89
## 442  1902 138904.90
## 443  1903 233386.83
## 444  1904 153786.64
## 445  1905 201887.58
## 446  1906 167346.66
## 447  1907 225965.31
## 448  1908 111155.85
## 449  1909 140508.19
## 450  1910 122722.05
## 451  1911 221152.48
## 452  1912 347171.80
## 453  1913 169187.68
## 454  1914  71961.61
## 455  1915 317004.75
## 456  1916  63059.13
## 457  1917 241170.81
## 458  1918 140155.46
## 459  1919 171020.37
## 460  1920 163304.49
## 461  1921 326782.24
## 462  1922 276243.41
## 463  1923 237813.29
## 464  1924 233076.57
## 465  1925 205650.49
## 466  1926 322358.22
## 467  1927 102776.12
## 468  1928 159134.45
## 469  1929 113788.05
## 470  1930 147160.84
## 471  1931 137627.18
## 472  1932 126777.75
## 473  1933 135563.19
## 474  1934 169944.87
## 475  1935 161049.83
## 476  1936 164660.17
## 477  1937 178829.70
## 478  1938 172678.07
## 479  1939 279208.03
## 480  1940 190707.39
## 481  1941 159782.02
## 482  1942 196850.18
## 483  1943 221053.54
## 484  1944 370030.43
## 485  1945 365280.69
## 486  1946 171893.84
## 487  1947 314669.36
## 488  1948 123026.87
## 489  1949 237106.25
## 490  1950 180521.77
## 491  1951 256858.46
## 492  1952 222868.90
## 493  1953 169339.42
## 494  1954 194717.71
## 495  1955 123055.86
## 496  1956 294174.23
## 497  1957 169366.60
## 498  1958 266859.96
## 499  1959 145345.68
## 500  1960 100916.56
## 501  1961 137016.15
## 502  1962 110430.19
## 503  1963  99609.17
## 504  1964  98866.59
## 505  1965 131858.27
## 506  1966 148863.85
## 507  1967 265850.51
## 508  1968 396533.23
## 509  1969 390545.37
## 510  1970 380651.71
## 511  1971 428133.51
## 512  1972 375902.78
## 513  1973 236269.44
## 514  1974 315929.84
## 515  1975 535599.14
## 516  1976 285781.58
## 517  1977 364904.51
## 518  1978 354500.66
## 519  1979 373838.97
## 520  1980 227156.48
## 521  1981 355371.37
## 522  1982 218946.34
## 523  1983 205051.89
## 524  1984 182960.11
## 525  1985 202487.32
## 526  1986 213187.57
## 527  1987 180205.74
## 528  1988 172259.06
## 529  1989 196885.72
## 530  1990 210470.40
## 531  1991 225111.24
## 532  1992 195763.08
## 533  1993 176221.69
## 534  1994 221840.63
## 535  1995 182565.34
## 536  1996 264164.32
## 537  1997 316215.89
## 538  1998 306791.77
## 539  1999 269777.66
## 540  2000 303689.71
## 541  2001 275502.73
## 542  2002 256206.67
## 543  2003 253812.14
## 544  2004 284374.49
## 545  2005 229196.44
## 546  2006 221366.99
## 547  2007 254614.92
## 548  2008 207606.89
## 549  2009 188579.26
## 550  2010 198921.78
## 551  2011 153060.72
## 552  2012 159854.59
## 553  2013 159238.44
## 554  2014 177030.54
## 555  2015 204178.20
## 556  2016 179517.01
## 557  2017 190403.71
## 558  2018 130888.06
## 559  2019 132681.11
## 560  2020 124927.40
## 561  2021 106425.11
## 562  2022 199146.54
## 563  2023 129523.33
## 564  2024 303977.37
## 565  2025 355968.56
## 566  2026 178999.60
## 567  2027 158105.47
## 568  2028 158957.94
## 569  2029 161766.19
## 570  2030 268610.05
## 571  2031 229984.72
## 572  2032 245600.15
## 573  2033 259491.87
## 574  2034 187728.35
## 575  2035 226612.66
## 576  2036 200671.48
## 577  2037 203341.48
## 578  2038 335236.54
## 579  2039 254382.05
## 580  2040 273117.68
## 581  2041 277768.38
## 582  2042 201615.23
## 583  2043 161184.63
## 584  2044 159504.55
## 585  2045 193090.85
## 586  2046 150802.93
## 587  2047 127474.04
## 588  2048 148239.06
## 589  2049 165180.07
## 590  2050 160372.35
## 591  2051 111241.48
## 592  2052 131247.35
## 593  2053 142931.03
## 594  2054  81147.36
## 595  2055 149753.34
## 596  2056 158962.15
## 597  2057 115103.69
## 598  2058 190771.03
## 599  2059 144395.42
## 600  2060 160369.82
## 601  2061 171488.40
## 602  2062 134248.83
## 603  2063 115398.89
## 604  2064 133121.45
## 605  2065 118501.46
## 606  2066 177401.35
## 607  2067 167817.55
## 608  2068 162409.50
## 609  2069  89400.21
## 610  2070  92955.74
## 611  2071  93666.14
## 612  2072 140278.62
## 613  2073 150973.73
## 614  2074 182377.53
## 615  2075 156568.56
## 616  2076 115852.98
## 617  2077 143636.35
## 618  2078 128223.84
## 619  2079 136666.10
## 620  2080 125737.48
## 621  2081 125854.47
## 622  2082 137414.02
## 623  2083 127953.03
## 624  2084 117412.34
## 625  2085 119428.73
## 626  2086 133194.32
## 627  2087 117840.47
## 628  2088 102895.52
## 629  2089  92668.22
## 630  2090 122198.65
## 631  2091  97342.55
## 632  2092 116776.24
## 633  2093 136602.36
## 634  2094 145545.87
## 635  2095 136687.94
## 636  2096  98197.02
## 637  2097  92412.47
## 638  2098 117817.30
## 639  2099  55404.62
## 640  2100  83440.60
## 641  2101 123896.49
## 642  2102 118333.34
## 643  2103 110014.22
## 644  2104 142059.31
## 645  2105 113173.55
## 646  2106  67229.99
## 647  2107 187345.41
## 648  2108 113049.73
## 649  2109 105377.65
## 650  2110 130838.40
## 651  2111 157663.45
## 652  2112 140751.53
## 653  2113 119610.24
## 654  2114 135545.92
## 655  2115 167636.12
## 656  2116 133144.85
## 657  2117 147751.52
## 658  2118 140084.32
## 659  2119 108268.27
## 660  2120 134168.31
## 661  2121  90374.77
## 662  2122 103931.98
## 663  2123 116132.89
## 664  2124 183695.14
## 665  2125 116539.88
## 666  2126 176372.94
## 667  2127 127617.20
## 668  2128 109773.63
## 669  2129 113631.53
## 670  2130 109266.22
## 671  2131 151020.61
## 672  2132 127082.50
## 673  2133 132887.63
## 674  2134 139070.17
## 675  2135 112462.28
## 676  2136  76492.82
## 677  2137 113389.03
## 678  2138 117236.84
## 679  2139 160814.83
## 680  2140 132707.72
## 681  2141 149603.20
## 682  2142 114863.00
## 683  2143 139309.79
## 684  2144 108042.96
## 685  2145 130479.15
## 686  2146 162989.80
## 687  2147 192254.84
## 688  2148 151460.91
## 689  2149 125517.67
## 690  2150 229360.56
## 691  2151 122127.71
## 692  2152 192411.80
## 693  2153 156302.75
## 694  2154 107371.62
## 695  2155 137700.63
## 696  2156 269856.65
## 697  2157 223587.17
## 698  2158 234803.55
## 699  2159 226530.47
## 700  2160 188168.59
## 701  2161 234074.92
## 702  2162 338361.09
## 703  2163 318760.17
## 704  2164 225313.83
## 705  2165 216065.51
## 706  2166 141385.45
## 707  2167 209446.09
## 708  2168 205861.70
## 709  2169 191068.70
## 710  2170 223676.99
## 711  2171 147629.85
## 712  2172 131034.56
## 713  2173 189823.79
## 714  2174 239658.19
## 715  2175 272482.00
## 716  2176 266502.99
## 717  2177 248726.31
## 718  2178 222797.30
## 719  2179 146846.16
## 720  2180 206614.42
## 721  2181 193224.39
## 722  2182 211973.17
## 723  2183 186996.01
## 724  2184 104210.61
## 725  2185 130493.07
## 726  2186 152347.30
## 727  2187 158444.44
## 728  2188 144158.23
## 729  2189 270403.66
## 730  2190  91233.45
## 731  2191  97166.96
## 732  2192  73964.13
## 733  2193 125617.52
## 734  2194 109331.09
## 735  2195  87599.73
## 736  2196  91189.76
## 737  2197 107452.64
## 738  2198 163759.35
## 739  2199 179577.62
## 740  2200 160977.10
## 741  2201 150128.27
## 742  2202 216391.68
## 743  2203 158095.53
## 744  2204 190196.98
## 745  2205 131080.98
## 746  2206 162988.66
## 747  2207 206944.27
## 748  2208 269682.95
## 749  2209 198143.85
## 750  2210 111242.11
## 751  2211 135427.34
## 752  2212 120356.17
## 753  2213  86113.25
## 754  2214 134233.95
## 755  2215 107650.78
## 756  2216 133399.01
## 757  2217  29389.19
## 758  2218  85207.97
## 759  2219  94117.55
## 760  2220  77064.36
## 761  2221 316870.60
## 762  2222 279022.19
## 763  2223 274877.12
## 764  2224 210813.99
## 765  2225 141950.58
## 766  2226 173731.01
## 767  2227 216034.93
## 768  2228 240341.47
## 769  2229 256185.86
## 770  2230 160385.81
## 771  2231 215206.64
## 772  2232 184240.90
## 773  2233 171971.30
## 774  2234 227805.14
## 775  2235 216153.33
## 776  2236 254479.36
## 777  2237 293165.87
## 778  2238 194546.44
## 779  2239 109080.09
## 780  2240 165830.32
## 781  2241 126357.29
## 782  2242 103222.17
## 783  2243 104083.30
## 784  2244  98463.66
## 785  2245 103346.35
## 786  2246 129769.25
## 787  2247 108451.43
## 788  2248 114557.45
## 789  2249  99785.58
## 790  2250 113310.93
## 791  2251 140816.12
## 792  2252 168034.37
## 793  2253 166081.22
## 794  2254 178411.18
## 795  2255 175680.73
## 796  2256 176640.23
## 797  2257 204115.99
## 798  2258 166205.68
## 799  2259 168419.79
## 800  2260 121462.33
## 801  2261 186157.34
## 802  2262 211812.16
## 803  2263 385609.58
## 804  2264 464290.88
## 805  2265 188766.62
## 806  2266 298993.26
## 807  2267 365281.20
## 808  2268 413022.04
## 809  2269 155986.09
## 810  2270 183747.73
## 811  2271 218069.41
## 812  2272 211699.83
## 813  2273 149219.16
## 814  2274 185567.79
## 815  2275 169288.88
## 816  2276 182502.44
## 817  2277 175813.49
## 818  2278 156634.48
## 819  2279 127970.28
## 820  2280 101366.03
## 821  2281 163995.58
## 822  2282 181373.49
## 823  2283  98966.05
## 824  2284 108629.41
## 825  2285 141688.93
## 826  2286 130867.99
## 827  2287 340845.68
## 828  2288 274528.61
## 829  2289 410065.17
## 830  2290 470063.34
## 831  2291 383498.37
## 832  2292 438068.77
## 833  2293 488679.25
## 834  2294 398188.68
## 835  2295 514759.74
## 836  2296 346521.47
## 837  2297 344262.50
## 838  2298 321902.03
## 839  2299 371402.49
## 840  2300 351270.50
## 841  2301 308326.03
## 842  2302 235070.02
## 843  2303 251486.73
## 844  2304 271686.18
## 845  2305 221129.00
## 846  2306 206650.97
## 847  2307 195912.94
## 848  2308 226690.66
## 849  2309 286827.00
## 850  2310 212085.89
## 851  2311 196969.43
## 852  2312 177872.82
## 853  2313 176264.12
## 854  2314 179238.74
## 855  2315 182304.84
## 856  2316 225630.22
## 857  2317 180789.32
## 858  2318 178169.15
## 859  2319 187059.47
## 860  2320 180420.13
## 861  2321 226815.63
## 862  2322 180685.31
## 863  2323 185963.33
## 864  2324 191113.02
## 865  2325 218359.21
## 866  2326 185625.15
## 867  2327 206886.79
## 868  2328 211455.33
## 869  2329 187554.08
## 870  2330 173636.62
## 871  2331 336185.41
## 872  2332 391441.51
## 873  2333 327569.76
## 874  2334 277741.16
## 875  2335 283925.65
## 876  2336 305275.92
## 877  2337 208472.93
## 878  2338 270204.62
## 879  2339 225594.26
## 880  2340 374229.44
## 881  2341 254315.74
## 882  2342 238836.39
## 883  2343 227969.83
## 884  2344 213600.06
## 885  2345 240675.30
## 886  2346 216098.24
## 887  2347 204576.69
## 888  2348 245949.09
## 889  2349 192309.94
## 890  2350 307877.49
## 891  2351 267628.50
## 892  2352 263765.90
## 893  2353 268699.20
## 894  2354 128902.55
## 895  2355 137237.61
## 896  2356 145820.51
## 897  2357 179200.26
## 898  2358 189737.59
## 899  2359 142399.79
## 900  2360 129586.97
## 901  2361 141662.20
## 902  2362 298571.61
## 903  2363 140578.14
## 904  2364 151853.22
## 905  2365 219694.32
## 906  2366 207030.33
## 907  2367 252095.66
## 908  2368 220409.65
## 909  2369 246359.51
## 910  2370 165365.17
## 911  2371 155523.71
## 912  2372 191961.63
## 913  2373 267690.90
## 914  2374 293145.66
## 915  2375 275455.50
## 916  2376 312413.37
## 917  2377 362970.46
## 918  2378 158652.62
## 919  2379 198988.73
## 920  2380 143719.88
## 921  2381 165080.65
## 922  2382 200064.36
## 923  2383 201753.60
## 924  2384 225533.30
## 925  2385 161132.56
## 926  2386 138248.49
## 927  2387 139114.07
## 928  2388 128659.85
## 929  2389 121333.64
## 930  2390 145599.79
## 931  2391 128202.06
## 932  2392 114159.81
## 933  2393 179890.68
## 934  2394 149993.77
## 935  2395 166169.84
## 936  2396 156654.14
## 937  2397 203340.64
## 938  2398 120043.42
## 939  2399  60958.29
## 940  2400  74308.30
## 941  2401 113391.54
## 942  2402 128624.85
## 943  2403 158747.41
## 944  2404 148952.45
## 945  2405 161162.60
## 946  2406 142274.68
## 947  2407 125078.56
## 948  2408 135301.68
## 949  2409 125154.81
## 950  2410 179027.58
## 951  2411 124153.69
## 952  2412 138046.53
## 953  2413 134597.08
## 954  2414 148599.90
## 955  2415 148799.23
## 956  2416 130270.24
## 957  2417 139103.46
## 958  2418 133924.64
## 959  2419 110919.38
## 960  2420 137969.74
## 961  2421 154004.83
## 962  2422 101944.03
## 963  2423 103870.51
## 964  2424 138093.02
## 965  2425 122021.93
## 966  2426 117650.74
## 967  2427 116916.78
## 968  2428 187373.06
## 969  2429 119265.68
## 970  2430 144100.74
## 971  2431 131450.62
## 972  2432 138420.52
## 973  2433 135364.09
## 974  2434 143169.33
## 975  2435 149568.66
## 976  2436 114315.39
## 977  2437 108910.49
## 978  2438 133260.30
## 979  2439 114404.86
## 980  2440 114366.15
## 981  2441 115959.01
## 982  2442 113532.43
## 983  2443 120861.79
## 984  2444 121285.98
## 985  2445  79277.77
## 986  2446 112570.51
## 987  2447 189143.60
## 988  2448 119480.99
## 989  2449  91327.98
## 990  2450 139383.11
## 991  2451 129908.99
## 992  2452 182330.44
## 993  2453  87941.24
## 994  2454 129269.35
## 995  2455 144702.37
## 996  2456 127144.16
## 997  2457 126685.81
## 998  2458 130793.09
## 999  2459  95808.84
## 1000 2460 158832.06
## 1001 2461 121060.99
## 1002 2462 130230.82
## 1003 2463 134572.09
## 1004 2464 154049.10
## 1005 2465 134091.98
## 1006 2466 113426.32
## 1007 2467 159342.72
## 1008 2468  99969.34
## 1009 2469  97099.33
## 1010 2470 194346.94
## 1011 2471 195311.44
## 1012 2472 173011.76
## 1013 2473 112498.94
## 1014 2474  85962.20
## 1015 2475 200690.32
## 1016 2476 135911.94
## 1017 2477 124771.60
## 1018 2478 149568.57
## 1019 2479 122567.32
## 1020 2480 159996.18
## 1021 2481 128420.35
## 1022 2482 141797.25
## 1023 2483 111102.18
## 1024 2484 136016.15
## 1025 2485 117565.22
## 1026 2486 152944.27
## 1027 2487 189101.84
## 1028 2488 163524.45
## 1029 2489 156259.73
## 1030 2490 152329.84
## 1031 2491 103928.18
## 1032 2492 194051.98
## 1033 2493 183460.96
## 1034 2494 193102.89
## 1035 2495 134278.59
## 1036 2496 272257.06
## 1037 2497 143508.12
## 1038 2498 111688.82
## 1039 2499  96228.96
## 1040 2500 107780.27
## 1041 2501 132941.45
## 1042 2502 145302.34
## 1043 2503  97485.45
## 1044 2504 231771.45
## 1045 2505 223474.76
## 1046 2506 252777.10
## 1047 2507 316577.87
## 1048 2508 251588.34
## 1049 2509 211536.62
## 1050 2510 216140.03
## 1051 2511 183001.13
## 1052 2512 204138.96
## 1053 2513 210258.91
## 1054 2514 283105.00
## 1055 2515 141718.01
## 1056 2516 176178.20
## 1057 2517 133477.29
## 1058 2518 150133.66
## 1059 2519 215217.12
## 1060 2520 212085.22
## 1061 2521 195058.22
## 1062 2522 224260.43
## 1063 2523 116596.03
## 1064 2524 140676.47
## 1065 2525 140950.73
## 1066 2526 132542.10
## 1067 2527 128969.90
## 1068 2528 117642.35
## 1069 2529 138343.97
## 1070 2530 104597.25
## 1071 2531 232053.59
## 1072 2532 231034.37
## 1073 2533 195783.89
## 1074 2534 224055.76
## 1075 2535 292219.92
## 1076 2536 254138.29
## 1077 2537 226593.29
## 1078 2538 193547.71
## 1079 2539 189989.46
## 1080 2540 185647.96
## 1081 2541 187155.13
## 1082 2542 159471.62
## 1083 2543 115851.53
## 1084 2544 105567.82
## 1085 2545 157234.73
## 1086 2546 136526.56
## 1087 2547 144400.97
## 1088 2548 111090.21
## 1089 2549 148813.76
## 1090 2550 235447.29
## 1091 2551 134162.61
## 1092 2552 116860.66
## 1093 2553  93543.57
## 1094 2554 102834.32
## 1095 2555 140007.20
## 1096 2556  74598.29
## 1097 2557  99306.49
## 1098 2558 199225.43
## 1099 2559 150227.10
## 1100 2560 172712.97
## 1101 2561 178694.46
## 1102 2562 148938.25
## 1103 2563 157910.22
## 1104 2564 207827.16
## 1105 2565 155278.41
## 1106 2566 170497.29
## 1107 2567 146518.01
## 1108 2568 185483.16
## 1109 2569 192866.16
## 1110 2570 111331.01
## 1111 2571 176321.75
## 1112 2572 168773.41
## 1113 2573 210672.00
## 1114 2574 369869.98
## 1115 2575 115433.68
## 1116 2576 123692.54
## 1117 2577 155393.01
## 1118 2578  90608.46
## 1119 2579  55509.86
## 1120 2580 137216.56
## 1121 2581 111395.93
## 1122 2582 108914.07
## 1123 2583 296034.20
## 1124 2584 169547.35
## 1125 2585 166478.67
## 1126 2586 208147.34
## 1127 2587 199845.80
## 1128 2588 145737.11
## 1129 2589 148361.52
## 1130 2590 221457.68
## 1131 2591 277420.77
## 1132 2592 236308.67
## 1133 2593 255709.44
## 1134 2594 185425.57
## 1135 2595 198990.90
## 1136 2596 282526.83
## 1137 2597 183344.37
## 1138 2598 286048.17
## 1139 2599 315542.77
## 1140 2600 208324.54
## 1141 2601 167079.52
## 1142 2602  71614.28
## 1143 2603  93782.77
## 1144 2604  63910.05
## 1145 2605  73195.76
## 1146 2606 134480.63
## 1147 2607 187765.77
## 1148 2608 212438.46
## 1149 2609 143840.07
## 1150 2610 105652.98
## 1151 2611  92118.26
## 1152 2612 153684.69
## 1153 2613 119692.89
## 1154 2614 115929.51
## 1155 2615 160468.55
## 1156 2616 145393.64
## 1157 2617 164544.77
## 1158 2618 137569.57
## 1159 2619 188528.48
## 1160 2620 178743.83
## 1161 2621 174933.96
## 1162 2622 174966.19
## 1163 2623 239291.07
## 1164 2624 295912.59
## 1165 2625 332715.95
## 1166 2626 168965.76
## 1167 2627 173108.35
## 1168 2628 471576.59
## 1169 2629 505217.23
## 1170 2630 372100.36
## 1171 2631 469092.54
## 1172 2632 453492.81
## 1173 2633 300312.13
## 1174 2634 397822.79
## 1175 2635 156292.46
## 1176 2636 177268.17
## 1177 2637 167644.27
## 1178 2638 308816.99
## 1179 2639 196211.15
## 1180 2640 143871.05
## 1181 2641 120788.38
## 1182 2642 178599.09
## 1183 2643 106861.05
## 1184 2644 110230.06
## 1185 2645  96680.88
## 1186 2646  98497.38
## 1187 2647  97789.62
## 1188 2648 152658.64
## 1189 2649 149123.13
## 1190 2650 154939.29
## 1191 2651 140404.39
## 1192 2652 436738.56
## 1193 2653 305705.57
## 1194 2654 230560.58
## 1195 2655 378538.41
## 1196 2656 344885.02
## 1197 2657 353628.89
## 1198 2658 361236.80
## 1199 2659 312587.25
## 1200 2660 363213.49
## 1201 2661 358973.63
## 1202 2662 365840.02
## 1203 2663 298034.11
## 1204 2664 274261.61
## 1205 2665 363577.20
## 1206 2666 300207.51
## 1207 2667 180078.04
## 1208 2668 189531.06
## 1209 2669 169755.93
## 1210 2670 300860.92
## 1211 2671 189595.97
## 1212 2672 205317.28
## 1213 2673 199109.12
## 1214 2674 202881.37
## 1215 2675 164287.95
## 1216 2676 191738.73
## 1217 2677 181547.67
## 1218 2678 284259.48
## 1219 2679 274146.70
## 1220 2680 295368.27
## 1221 2681 410342.92
## 1222 2682 322741.43
## 1223 2683 537692.03
## 1224 2684 316032.17
## 1225 2685 353176.76
## 1226 2686 281173.95
## 1227 2687 301011.47
## 1228 2688 237663.55
## 1229 2689 212788.19
## 1230 2690 446509.61
## 1231 2691 191603.32
## 1232 2692 124559.62
## 1233 2693 191031.52
## 1234 2694 138575.20
## 1235 2695 177822.30
## 1236 2696 170433.33
## 1237 2697 163705.47
## 1238 2698 171982.63
## 1239 2699 182545.90
## 1240 2700 153118.52
## 1241 2701 144594.92
## 1242 2702 132315.96
## 1243 2703 141045.40
## 1244 2704 143524.70
## 1245 2705 111995.92
## 1246 2706 111063.46
## 1247 2707 134684.17
## 1248 2708 121825.13
## 1249 2709 102732.25
## 1250 2710 116815.57
## 1251 2711 377767.09
## 1252 2712 364818.38
## 1253 2713 174960.29
## 1254 2714 153065.59
## 1255 2715 159835.25
## 1256 2716 156015.36
## 1257 2717 201617.45
## 1258 2718 227950.03
## 1259 2719 152937.76
## 1260 2720 179430.90
## 1261 2721 140888.10
## 1262 2722 141456.95
## 1263 2723 150179.22
## 1264 2724 129980.43
## 1265 2725 133267.54
## 1266 2726 136558.25
## 1267 2727 182208.84
## 1268 2728 176650.42
## 1269 2729 132327.04
## 1270 2730 136813.36
## 1271 2731 139108.29
## 1272 2732 117511.63
## 1273 2733 162170.67
## 1274 2734 158077.51
## 1275 2735 133265.83
## 1276 2736 127046.16
## 1277 2737 116187.93
## 1278 2738 151942.95
## 1279 2739 168427.80
## 1280 2740 133634.39
## 1281 2741 136718.36
## 1282 2742 156983.51
## 1283 2743 140369.53
## 1284 2744 161626.69
## 1285 2745 144891.86
## 1286 2746 139894.24
## 1287 2747 164864.43
## 1288 2748 126285.02
## 1289 2749 117536.08
## 1290 2750 139728.70
## 1291 2751 135434.73
## 1292 2752 194082.61
## 1293 2753 155743.77
## 1294 2754 210148.97
## 1295 2755 136640.61
## 1296 2756  71088.61
## 1297 2757  87169.88
## 1298 2758  93727.15
## 1299 2759 127219.99
## 1300 2760  91143.41
## 1301 2761 151147.96
## 1302 2762 149229.84
## 1303 2763 198963.43
## 1304 2764 176086.89
## 1305 2765 218869.08
## 1306 2766 109246.77
## 1307 2767  99551.65
## 1308 2768 134863.63
## 1309 2769 119163.72
## 1310 2770 164285.01
## 1311 2771 124056.50
## 1312 2772 120885.68
## 1313 2773 132795.36
## 1314 2774 118784.23
## 1315 2775  94671.09
## 1316 2776 146002.97
## 1317 2777 139839.32
## 1318 2778 111425.91
## 1319 2779 104330.86
## 1320 2780 109296.45
## 1321 2781  96136.99
## 1322 2782  83065.99
## 1323 2783  68208.49
## 1324 2784 116831.09
## 1325 2785 111230.17
## 1326 2786  82656.25
## 1327 2787 115761.96
## 1328 2788  66499.11
## 1329 2789 155953.95
## 1330 2790  90516.84
## 1331 2791 105338.69
## 1332 2792  51780.99
## 1333 2793 166375.37
## 1334 2794  87780.20
## 1335 2795 118398.81
## 1336 2796 103958.58
## 1337 2797 176036.14
## 1338 2798  89518.10
## 1339 2799 108542.58
## 1340 2800  71002.13
## 1341 2801 113186.13
## 1342 2802 126620.76
## 1343 2803 170205.27
## 1344 2804 145895.53
## 1345 2805 110356.82
## 1346 2806 104741.05
## 1347 2807 172573.79
## 1348 2808 138393.17
## 1349 2809 143793.40
## 1350 2810 119664.41
## 1351 2811 159208.79
## 1352 2812 157864.94
## 1353 2813 155334.25
## 1354 2814 153753.30
## 1355 2815 116382.63
## 1356 2816 241722.65
## 1357 2817 143343.17
## 1358 2818 139273.43
## 1359 2819 210576.14
## 1360 2820 130667.25
## 1361 2821 110116.94
## 1362 2822 189394.99
## 1363 2823  44212.09
## 1364 2824 164391.08
## 1365 2825 162877.25
## 1366 2826 129481.14
## 1367 2827 126082.25
## 1368 2828 252359.75
## 1369 2829 209332.34
## 1370 2830 243249.13
## 1371 2831 170010.25
## 1372 2832 252078.18
## 1373 2833 275658.15
## 1374 2834 225334.94
## 1375 2835 213014.21
## 1376 2836 189303.76
## 1377 2837 177750.20
## 1378 2838 141883.97
## 1379 2839 178609.25
## 1380 2840 199138.94
## 1381 2841 197774.22
## 1382 2842 227801.36
## 1383 2843 137068.87
## 1384 2844 175902.37
## 1385 2845 107842.85
## 1386 2846 200604.60
## 1387 2847 193296.74
## 1388 2848 224399.78
## 1389 2849 204895.94
## 1390 2850 274864.08
## 1391 2851 241793.30
## 1392 2852 239065.16
## 1393 2853 234595.93
## 1394 2854 146332.14
## 1395 2855 201625.46
## 1396 2856 216579.16
## 1397 2857 188780.62
## 1398 2858 206986.47
## 1399 2859 134406.78
## 1400 2860 123782.84
## 1401 2861 135717.95
## 1402 2862 175666.05
## 1403 2863 119627.30
## 1404 2864 181310.80
## 1405 2865 147645.19
## 1406 2866 144920.47
## 1407 2867  73148.18
## 1408 2868 131472.03
## 1409 2869 107406.46
## 1410 2870 149470.34
## 1411 2871  76903.99
## 1412 2872  17880.18
## 1413 2873 115219.06
## 1414 2874 113163.38
## 1415 2875 125441.76
## 1416 2876 169550.13
## 1417 2877 123014.77
## 1418 2878 160960.69
## 1419 2879 113031.46
## 1420 2880 101112.90
## 1421 2881 161872.42
## 1422 2882 157798.76
## 1423 2883 187115.65
## 1424 2884 214313.54
## 1425 2885 182514.89
## 1426 2886 213854.61
## 1427 2887 102666.24
## 1428 2888 130019.78
## 1429 2889  66984.69
## 1430 2890  68836.91
## 1431 2891 138766.14
## 1432 2892  47437.92
## 1433 2893  90915.54
## 1434 2894  59854.72
## 1435 2895 331825.34
## 1436 2896 278441.27
## 1437 2897 191379.51
## 1438 2898 171090.47
## 1439 2899 200484.17
## 1440 2900 160364.86
## 1441 2901 145502.91
## 1442 2902 194466.34
## 1443 2903 308409.45
## 1444 2904 319232.69
## 1445 2905 100693.19
## 1446 2906 208912.27
## 1447 2907  98248.14
## 1448 2908 124092.41
## 1449 2909 163967.79
## 1450 2910  82462.73
## 1451 2911  71449.94
## 1452 2912 149567.88
## 1453 2913  74592.57
## 1454 2914  63822.70
## 1455 2915  64441.68
## 1456 2916  74572.44
## 1457 2917 126261.21
## 1458 2918 112957.66
## 1459 2919 204540.15
#write_csv(fw_submission, "../kaggleData/forward SelectionPredictions.csv")

nrow(fw_submission)
## [1] 1459
sum(is.na(fw_submission))
## [1] 0
fw_submission_na <- fw_submission %>% filter_all(any_vars(is.na(.))) 
#fw_submission_na
fw_vif = VIF(fw_model)
c(fw_vif)
##                       OverallQual                         GrLivArea 
##                          3.773907                        256.636732 
##                    KitchenQual_Ex                         X1stFlrSF 
##                          2.632573                         99.014170 
##                        GrLivArea2              Neighborhood_Edwards 
##                         80.586735                          3.381014 
##                      YearRemodAdd                           LotArea 
##                          2.625878                         51.757325 
##                         X2ndFlrSF                          HalfBath 
##                        124.985564                          2.554708 
##             SaleCondition_Abnorml              SaleCondition_Normal 
##                          2.375484                          3.093742 
##                      BsmtFullBath                        GarageCars 
##                          1.386227                          2.177654 
##              SaleCondition_Alloca              SaleCondition_Family 
##                          1.462102                          1.326634 
##                    KitchenQual_Gd                 HouseStyle_1.5Unf 
##                          2.394590                          1.802298 
##              Neighborhood_OldTown             SaleCondition_AdjLand 
##                          3.094342                          1.195917 
##                        Fireplaces                          PoolArea 
##                          1.753694                          1.393860 
##              Neighborhood_Crawfor               Neighborhood_NWAmes 
##                          2.198957                          3.245744 
##                          FullBath                      BedroomAbvGr 
##                          3.261856                          2.790470 
##              Neighborhood_Blmngtn              Neighborhood_MeadowV 
##                          1.619091                          1.585665 
##              Neighborhood_Veenker              Neighborhood_NridgHt 
##                          1.773985                         10.193973 
##                 HouseStyle_2.5Unf              Neighborhood_SawyerW 
##                          1.512316                          2.647668 
##              Neighborhood_Mitchel                Neighborhood_NAmes 
##                          2.181674                          5.956861 
##               Neighborhood_Timber               Neighborhood_Sawyer 
##                          2.254797                          3.583141 
##                    KitchenQual_Fa              Neighborhood_CollgCr 
##                          1.211134                          4.902969 
##               Neighborhood_BrDale                           Remodel 
##                          1.695397                          1.610638 
##                 HouseStyle_SFoyer              Neighborhood_ClearCr 
##                          1.898585                          2.622540 
##                            YrSold              Neighborhood_NPkVill 
##                          1.097667                          1.322714 
##              Neighborhood_Blueste              Neighborhood_Somerst 
##                          1.089321                          4.422364 
##              Neighborhood_StoneBr                      BsmtHalfBath 
##                          3.130177                          1.152040 
##                Neighborhood_SWISU               Neighborhood_IDOTRR 
##                          2.987812                          1.650536 
##                 HouseStyle_1.5Fin              Neighborhood_Gilbert 
##                          4.642037                          3.464586 
##                 HouseStyle_1Story                 HouseStyle_2Story 
##                          8.775975                         11.876228 
##              Neighborhood_NoRidge   Neighborhood_Edwards:GrLivArea2 
##                          2.824040                         35.519032 
##    GrLivArea:Neighborhood_Edwards     GrLivArea2:Neighborhood_NAmes 
##                         18.596586                          2.555765 
##      LotArea:Neighborhood_NridgHt         KitchenQual_Ex:GrLivArea2 
##                          2.155952                          8.040991 
##          GrLivArea:KitchenQual_Gd         LotArea:HouseStyle_2Story 
##                          3.023628                          2.389516 
## BedroomAbvGr:Neighborhood_NridgHt    GrLivArea:Neighborhood_OldTown 
##                          2.184358                          1.536993 
##   GrLivArea2:Neighborhood_ClearCr    GrLivArea:Neighborhood_NridgHt 
##                         48.057151                        174.058099 
##       GrLivArea:HouseStyle_1Story     GrLivArea:Neighborhood_Sawyer 
##                          6.044251                          2.036288 
##   GrLivArea:SaleCondition_Abnorml      Neighborhood_Edwards:LotArea 
##                          3.087632                          5.359296 
##    GrLivArea:Neighborhood_ClearCr      LotArea:Neighborhood_Somerst 
##                         52.816559                          1.873854 
##    GrLivArea:Neighborhood_StoneBr   BedroomAbvGr:Neighborhood_NAmes 
##                         93.125660                          1.979839 
##      LotArea:Neighborhood_Crawfor        LotArea:Neighborhood_SWISU 
##                          1.271402                          2.195673 
##    GrLivArea2:Neighborhood_NWAmes   GrLivArea2:Neighborhood_StoneBr 
##                          1.328769                         97.173759 
## BedroomAbvGr:Neighborhood_Veenker   GrLivArea2:SaleCondition_Family 
##                          1.553344                          1.264948 
##    GrLivArea:SaleCondition_Normal      LotArea:SaleCondition_Normal 
##                         17.120036                         47.686675 
##      LotArea:Neighborhood_StoneBr BedroomAbvGr:Neighborhood_SawyerW 
##                          3.234558                          1.205464 
##      LotArea:Neighborhood_SawyerW   GrLivArea2:Neighborhood_NridgHt 
##                          1.188339                        132.762950
bw_fit = ols_step_backward_p(lm_fit_q2, penter=0.05, details = F)
bw_fit
## 
## 
##                                            Elimination Summary                                            
## ---------------------------------------------------------------------------------------------------------
##         Variable                                           Adj.                                              
## Step                 Removed                 R-Square    R-Square      C(p)         AIC           RMSE       
## ---------------------------------------------------------------------------------------------------------
##    1    GrLivArea:SaleCondition_Family         0.9318      0.9212    195.0012    33562.1859    22294.7567    
##    2    Neighborhood_NWAmes:BedroomAbvGr       0.9318      0.9213    193.0036    33560.1886    22285.9637    
##    3    Neighborhood_Gilbert:GrLivArea2        0.9318      0.9214    191.0075    33558.1932    22277.1954    
##    4    KitchenQual_Ex:GrLivArea2              0.9318      0.9214    189.0125    33556.1990    22268.4465    
##    5    Neighborhood_Timber:BedroomAbvGr       0.9318      0.9215    187.0177    33554.2050    22259.7091    
##    6    Neighborhood_Somerst                   0.9318      0.9215    185.2914    33552.5213    22253.3479    
##    7    Neighborhood_CollgCr                   0.9317      0.9215    184.9011    33552.3805    22258.7525    
##    8    Neighborhood_Veenker:BedroomAbvGr      0.9317      0.9216    182.9016    33550.3811    22249.9990    
##    9    SaleCondition_Abnorml:GrLivArea2       0.9317      0.9216    180.9027    33548.3824    22241.2608    
##   10    GrLivArea:HouseStyle_SFoyer            0.9317      0.9217    178.9131    33546.3943    22232.6144    
##   11    SaleCondition_Normal:GrLivArea2        0.9317      0.9217    176.9297    33544.4136    22224.0335    
##   12    Neighborhood_BrDale:LotArea            0.9317      0.9218    174.9472    33542.4337    22215.4695    
##   13    Neighborhood_Sawyer:GrLivArea2         0.9317      0.9219    172.9676    33540.4573    22206.9425    
##   14    GrLivArea:Neighborhood_Blueste         0.9317      0.9219    170.9906    33538.4838    22198.4470    
##   15    YrSold                                 0.9317       0.922    169.0133    33536.5099    22189.9594    
##   16    Neighborhood_MeadowV:BedroomAbvGr      0.9317       0.922    167.0463    33534.5480    22181.5724    
##   17    Neighborhood_MeadowV:LotArea           0.9317      0.9221    165.0589    33532.5626    22173.0163    
##   18    Neighborhood_Gilbert:BedroomAbvGr      0.9317      0.9222    163.0964    33530.6058    22164.6886    
##   19    Neighborhood_NoRidge                   0.9317      0.9222    161.1312    33528.6461    22156.3477    
##   20    HouseStyle_2.5Unf:GrLivArea2           0.9316      0.9223    159.1816    33526.7042    22148.1521    
##   21    Neighborhood_IDOTRR:LotArea            0.9316      0.9223    157.2547    33524.7885    22140.1652    
##   22    Neighborhood_OldTown:LotArea           0.9316      0.9224    155.3284    33522.8737    22132.1939    
##   23    HouseStyle_1Story:BedroomAbvGr         0.9316      0.9224    153.4129    33520.9711    22124.3254    
##   24    Neighborhood_CollgCr:GrLivArea2        0.9316      0.9225    151.5029    33519.0750    22116.5152    
##   25    Remodel                                0.9316      0.9225    149.6133    33517.2023    22108.8918    
##   26    HouseStyle_1Story                      0.9316      0.9226    148.0532    33515.7097    22104.1547    
##   27    X2ndFlrSF                              0.9316      0.9226    146.1410    33513.8109    22096.3517    
##   28    GrLivArea:Neighborhood_IDOTRR          0.9316      0.9227    144.2540    33511.9413    22088.7783    
##   29    GrLivArea:Neighborhood_SWISU           0.9316      0.9227    142.3597    33510.0631    22081.1498    
##   30    SaleCondition_AdjLand                  0.9316      0.9228    140.6235    33508.3672    22074.9077    
##   31    GrLivArea:SaleCondition_AdjLand        0.9316      0.9228    138.6548    33506.4032    22066.6490    
##   32    HouseStyle_SFoyer:BedroomAbvGr         0.9316      0.9229    136.7627    33504.5277    22059.0677    
##   33    GrLivArea:Neighborhood_Blmngtn         0.9316      0.9229    134.9106    33502.6981    22051.8427    
##   34    KitchenQual_Gd:BedroomAbvGr            0.9315       0.923    133.0577    33500.8677    22044.6197    
##   35    Neighborhood_IDOTRR:GrLivArea2         0.9315       0.923    131.2274    33499.0632    22037.6018    
##   36    KitchenQual_Fa:BedroomAbvGr            0.9315      0.9231    129.3854    33497.2451    22030.4906    
##   37    Neighborhood_StoneBr:BedroomAbvGr      0.9315      0.9231    127.5596    33495.4458    22023.5291    
##   38    HouseStyle_2.5Unf:BedroomAbvGr         0.9315      0.9232    125.7847    33493.7051    22017.0180    
##   39    GrLivArea:HouseStyle_1.5Unf            0.9315      0.9232    123.9925    33491.9444    22010.3652    
##   40    Neighborhood_OldTown:GrLivArea2        0.9315      0.9233    122.2228    33490.2095    22003.9156    
##   41    Neighborhood_Mitchel:BedroomAbvGr      0.9315      0.9233    120.4538    33488.4754    21997.4796    
##   42    GrLivArea:Neighborhood_NAmes           0.9315      0.9234    118.6825    33486.7386    21991.0323    
##   43    KitchenQual_Fa:GrLivArea2              0.9315      0.9234    116.8575    33484.9400    21984.1272    
##   44    Neighborhood_NPkVill                   0.9314      0.9235    115.2235    33483.3611    21978.8848    
##   45    GrLivArea:Neighborhood_NPkVill         0.9314      0.9235    113.2325    33481.3714    21970.5592    
##   46    Neighborhood_NPkVill:GrLivArea2        0.9314      0.9236    111.3716    33479.5315    21963.3695    
##   47    Neighborhood_NPkVill:BedroomAbvGr      0.9314      0.9236    109.3812    33477.5425    21955.0679    
##   48    Neighborhood_NPkVill:LotArea           0.9314      0.9237    107.6272    33475.8253    21948.8188    
##   49    GrLivArea:Neighborhood_BrDale          0.9314      0.9237    105.8935    33474.1315    21942.7534    
##   50    Neighborhood_BrDale:BedroomAbvGr       0.9314      0.9238    104.0643    33472.3280    21935.8714    
##   51    Neighborhood_Blueste                   0.9314      0.9238    102.3255    33470.6282    21929.7772    
##   52    Neighborhood_Timber                    0.9312      0.9236    104.2643    33473.1481    21955.3966    
##   53    HouseStyle_2.5Unf                      0.9311      0.9236    103.1523    33472.1652    21954.6989    
##   54    LotArea:HouseStyle_2.5Unf              0.9311      0.9237    101.4639    33470.5219    21949.0435    
##   55    Neighborhood_Veenker:GrLivArea2        0.9311      0.9237     99.8972    33469.0178    21944.4418    
##   56    GrLivArea:Neighborhood_Veenker         0.9311      0.9238     97.9645    33467.0948    21936.7001    
##   57    GrLivArea:Neighborhood_NWAmes           0.931      0.9238     96.4419    33465.6409    21932.4906    
##   58    SaleCondition_AdjLand:GrLivArea2        0.931      0.9238     95.0239    33464.3065    21929.1855    
##   59    LotArea:SaleCondition_AdjLand           0.931      0.9238     93.4527    33462.7967    21924.5700    
##   60    SaleCondition_Alloca:BedroomAbvGr       0.931      0.9239     91.9850    33461.4049    21920.8480    
##   61    KitchenQual_Ex:BedroomAbvGr            0.9309      0.9239     90.4733    33459.9626    21916.7538    
##   62    LotArea:HouseStyle_SFoyer              0.9309      0.9239     89.0635    33458.6365    21913.5383    
##   63    Neighborhood_MeadowV                   0.9307      0.9238     90.2208    33460.2360    21932.2933    
##   64    Neighborhood_BrDale                    0.9307      0.9238     89.4692    33459.6567    21934.6978    
##   65    Neighborhood_Edwards:LotArea           0.9306      0.9238     88.0286    33458.2930    21931.2157    
##   66    Neighborhood_Somerst:LotArea           0.9306      0.9238     86.4389    33456.7594    21926.4656    
##   67    Neighborhood_StoneBr:LotArea           0.9306      0.9239     84.8331    33455.2075    21921.5845    
##   68    Neighborhood_Veenker                   0.9305      0.9238     84.3292    33454.9065    21926.1020    
##   69    Neighborhood_Crawfor:BedroomAbvGr      0.9305      0.9239     82.8517    33453.4994    21922.3212    
##   70    HouseStyle_1.5Fin:BedroomAbvGr         0.9304      0.9239     81.5802    33452.3257    21920.2983    
##   71    Neighborhood_Mitchel:GrLivArea2        0.9304      0.9239     80.2217    33451.0529    21917.5387    
##   72    Neighborhood_SawyerW:LotArea           0.9304      0.9239     79.0902    33450.0370    21916.7130    
##   73    Neighborhood_BrDale:GrLivArea2         0.9303      0.9239     77.9602    33449.0219    21915.9005    
##   74    HouseStyle_1.5Fin                      0.9301      0.9237     80.3427    33451.9738    21944.8864    
##   75    HouseStyle_2Story                       0.930      0.9237     79.2729    33451.0226    21944.5650    
##   76    Neighborhood_Sawyer                    0.9292      0.9228     92.8754    33466.5043    22068.0937    
##   77    KitchenQual_Fa                         0.9291      0.9228     92.9117    33466.7704    22076.9843    
##   78    GrLivArea:KitchenQual_Fa               0.9291      0.9228     91.2537    33465.1507    22071.6258    
##   79    HouseStyle_SFoyer:GrLivArea2            0.929      0.9228     90.0553    33464.0416    22070.1335    
##   80    GrLivArea:HouseStyle_2Story             0.929      0.9228     88.5616    33462.6041    22066.1652    
##   81    SaleCondition_Family:BedroomAbvGr      0.9289      0.9229     87.4800    33461.6237    22065.6581    
##   82    KitchenQual_Gd:GrLivArea2              0.9289      0.9229     86.3766    33460.6185    22064.9699    
##   83    LotArea:HouseStyle_1.5Unf              0.9288      0.9229     85.2378    33459.5733    22063.9853    
## ---------------------------------------------------------------------------------------------------------
bw_model = bw_fit$model
ols_press(bw_model)
## [1] 958477265292
formatC(ols_press(bw_model), format = "e", digits = 6)
## [1] "9.584773e+11"
summary(bw_model)
## 
## Call:
## lm(formula = paste(response, "~", paste(preds, collapse = " + ")), 
##     data = l)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -150294  -11295    -361   11396  130759 
## 
## Coefficients:
##                                     Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                         187714.3     3152.3  59.548  < 2e-16 ***
## GrLivArea                           -12619.1     7525.1  -1.677 0.093788 .  
## Neighborhood_Blmngtn               -179014.9   120492.1  -1.486 0.137593    
## Neighborhood_ClearCr                 -2230.6     6593.7  -0.338 0.735195    
## Neighborhood_Crawfor                  9174.4     4052.4   2.264 0.023736 *  
## Neighborhood_Edwards                -23629.5     3196.3  -7.393 2.52e-13 ***
## Neighborhood_Gilbert                 -3004.2     3311.1  -0.907 0.364400    
## Neighborhood_IDOTRR                  -2732.3     4640.7  -0.589 0.556113    
## Neighborhood_Mitchel                 -9315.5     4189.3  -2.224 0.026339 *  
## Neighborhood_NAmes                  -15121.3     2480.2  -6.097 1.41e-09 ***
## Neighborhood_NridgHt                  -431.7     7544.8  -0.057 0.954381    
## Neighborhood_NWAmes                  -8113.6     3497.2  -2.320 0.020486 *  
## Neighborhood_OldTown                -17492.1     2837.7  -6.164 9.35e-10 ***
## Neighborhood_SawyerW                 -9254.9     3295.3  -2.808 0.005049 ** 
## Neighborhood_StoneBr                  9423.3     7035.0   1.339 0.180637    
## Neighborhood_SWISU                  -25235.9     8467.0  -2.980 0.002929 ** 
## LotArea                              17224.1    10150.7   1.697 0.089957 .  
## SaleCondition_Abnorml               -22395.5     3603.1  -6.216 6.80e-10 ***
## SaleCondition_Alloca                -24254.1     7928.7  -3.059 0.002264 ** 
## SaleCondition_Family                -14331.7     6370.7  -2.250 0.024633 *  
## SaleCondition_Normal                 -8828.9     2689.6  -3.283 0.001055 ** 
## HouseStyle_1.5Unf                    -5395.6     6192.0  -0.871 0.383705    
## HouseStyle_SFoyer                    -6129.5     5209.4  -1.177 0.239554    
## KitchenQual_Ex                       21644.4     3928.6   5.509 4.31e-08 ***
## KitchenQual_Gd                        7801.4     1828.3   4.267 2.12e-05 ***
## YearRemodAdd                          5417.4      888.8   6.095 1.43e-09 ***
## GarageCars                            5371.4      876.3   6.130 1.15e-09 ***
## PoolArea                              1669.0      719.7   2.319 0.020547 *  
## Fireplaces                            3890.5      764.3   5.091 4.08e-07 ***
## BsmtFullBath                          7243.7      692.8  10.455  < 2e-16 ***
## BsmtHalfBath                          2420.0      629.6   3.844 0.000127 ***
## FullBath                              5838.5     1027.1   5.684 1.61e-08 ***
## HalfBath                              3470.9      899.3   3.860 0.000119 ***
## BedroomAbvGr                        -15421.5     2776.9  -5.554 3.37e-08 ***
## OverallQual                          18206.8     1099.0  16.567  < 2e-16 ***
## GrLivArea2                           70028.5     8397.8   8.339  < 2e-16 ***
## X1stFlrSF                             8672.2     1221.4   7.100 2.01e-12 ***
## GrLivArea:Neighborhood_ClearCr      100302.5    34752.3   2.886 0.003961 ** 
## GrLivArea:Neighborhood_CollgCr      -14460.4     3439.4  -4.204 2.79e-05 ***
## GrLivArea:Neighborhood_Crawfor       42460.6    16582.7   2.561 0.010559 *  
## GrLivArea:Neighborhood_Edwards       61218.4     9058.1   6.758 2.07e-11 ***
## GrLivArea:Neighborhood_Gilbert       -5816.2     4872.5  -1.194 0.232816    
## GrLivArea:Neighborhood_MeadowV       47945.6    27350.0   1.753 0.079822 .  
## GrLivArea:Neighborhood_Mitchel      -12069.7     5103.9  -2.365 0.018180 *  
## GrLivArea:Neighborhood_NridgHt       64020.6    30780.0   2.080 0.037720 *  
## GrLivArea:Neighborhood_OldTown      -19649.5     3715.0  -5.289 1.43e-07 ***
## GrLivArea:Neighborhood_Sawyer        -9881.8     4255.2  -2.322 0.020367 *  
## GrLivArea:Neighborhood_SawyerW       29167.0    15539.9   1.877 0.060747 .  
## GrLivArea:Neighborhood_Somerst       90866.2    20639.7   4.402 1.15e-05 ***
## GrLivArea:Neighborhood_StoneBr       96045.0    31548.9   3.044 0.002377 ** 
## GrLivArea:Neighborhood_Timber        52797.8    25385.4   2.080 0.037729 *  
## GrLivArea:SaleCondition_Abnorml     -25728.5     4389.4  -5.861 5.76e-09 ***
## GrLivArea:SaleCondition_Alloca       92889.4    49869.6   1.863 0.062730 .  
## GrLivArea:SaleCondition_Normal      -16910.7     3445.0  -4.909 1.03e-06 ***
## GrLivArea:HouseStyle_1.5Fin          33056.2    13325.1   2.481 0.013232 *  
## GrLivArea:HouseStyle_1Story          21947.7     9078.7   2.418 0.015759 *  
## GrLivArea:HouseStyle_2.5Unf         -12479.1     7957.5  -1.568 0.117064    
## GrLivArea:KitchenQual_Ex             17737.6     3273.2   5.419 7.09e-08 ***
## GrLivArea:KitchenQual_Gd             10486.5     1862.8   5.630 2.20e-08 ***
## Neighborhood_Blmngtn:GrLivArea2      38546.6    33572.5   1.148 0.251106    
## Neighborhood_ClearCr:GrLivArea2    -123029.1    34254.3  -3.592 0.000340 ***
## Neighborhood_Crawfor:GrLivArea2     -49869.0    16886.2  -2.953 0.003199 ** 
## Neighborhood_Edwards:GrLivArea2    -116499.4     7449.5 -15.638  < 2e-16 ***
## GrLivArea2:Neighborhood_MeadowV     -79383.4    35717.1  -2.223 0.026411 *  
## Neighborhood_NAmes:GrLivArea2       -38363.5     4150.4  -9.243  < 2e-16 ***
## Neighborhood_NridgHt:GrLivArea2     -52724.7    28311.0  -1.862 0.062773 .  
## Neighborhood_NWAmes:GrLivArea2      -15481.1     3865.7  -4.005 6.55e-05 ***
## Neighborhood_SawyerW:GrLivArea2     -38862.3    17387.6  -2.235 0.025577 *  
## GrLivArea2:Neighborhood_Somerst    -105418.0    24798.9  -4.251 2.28e-05 ***
## Neighborhood_StoneBr:GrLivArea2     -92112.9    28853.8  -3.192 0.001444 ** 
## Neighborhood_SWISU:GrLivArea2       -27450.1     8170.5  -3.360 0.000802 ***
## GrLivArea2:Neighborhood_Timber      -58513.3    27142.8  -2.156 0.031279 *  
## SaleCondition_Alloca:GrLivArea2     -76031.0    46331.8  -1.641 0.101029    
## SaleCondition_Family:GrLivArea2     -29138.7     9275.5  -3.141 0.001718 ** 
## GrLivArea2:HouseStyle_1.5Fin        -42633.0    14927.1  -2.856 0.004355 ** 
## HouseStyle_1.5Unf:GrLivArea2        -21637.7     6249.2  -3.462 0.000552 ***
## GrLivArea2:HouseStyle_1Story        -24831.6    11501.1  -2.159 0.031021 *  
## GrLivArea2:HouseStyle_2Story         -9972.7     5013.9  -1.989 0.046901 *  
## Neighborhood_Blmngtn:LotArea       -296915.0   163543.2  -1.816 0.069667 .  
## Neighborhood_ClearCr:LotArea        -22543.3     3718.2  -6.063 1.73e-09 ***
## LotArea:Neighborhood_CollgCr        -18060.8     9940.4  -1.817 0.069452 .  
## Neighborhood_Crawfor:LotArea        -27256.9     7904.5  -3.448 0.000582 ***
## Neighborhood_Gilbert:LotArea        -11436.6     6052.9  -1.889 0.059046 .  
## Neighborhood_Mitchel:LotArea        -22164.4     6494.5  -3.413 0.000662 ***
## Neighborhood_NAmes:LotArea          -19014.5     6331.3  -3.003 0.002720 ** 
## Neighborhood_NridgHt:LotArea         32055.7    10427.5   3.074 0.002153 ** 
## Neighborhood_NWAmes:LotArea         -17698.9    10329.8  -1.713 0.086874 .  
## LotArea:Neighborhood_Sawyer         -37056.4     9119.2  -4.064 5.11e-05 ***
## Neighborhood_SWISU:LotArea          -39523.9    23990.4  -1.647 0.099690 .  
## LotArea:Neighborhood_Timber         -23466.1     3617.7  -6.486 1.23e-10 ***
## LotArea:Neighborhood_Veenker        -10397.2     6603.1  -1.575 0.115588    
## LotArea:SaleCondition_Abnorml         9452.4     8801.8   1.074 0.283054    
## LotArea:SaleCondition_Alloca        -28973.1    14832.1  -1.953 0.050978 .  
## LotArea:SaleCondition_Family         34716.0    18168.5   1.911 0.056245 .  
## LotArea:SaleCondition_Normal         21943.7     6596.0   3.327 0.000902 ***
## LotArea:HouseStyle_1.5Fin           -14720.5     7723.2  -1.906 0.056860 .  
## LotArea:HouseStyle_1Story           -11486.0     7641.4  -1.503 0.133040    
## LotArea:HouseStyle_2Story           -10074.3     7911.5  -1.273 0.203102    
## Neighborhood_Blmngtn:BedroomAbvGr    27419.8    12996.2   2.110 0.035057 *  
## Neighborhood_ClearCr:BedroomAbvGr     5174.2     3711.1   1.394 0.163468    
## BedroomAbvGr:Neighborhood_CollgCr    12700.4     3805.2   3.338 0.000868 ***
## Neighborhood_Edwards:BedroomAbvGr     9695.6     3436.3   2.822 0.004849 ** 
## Neighborhood_IDOTRR:BedroomAbvGr      6980.1     5064.0   1.378 0.168316    
## Neighborhood_NAmes:BedroomAbvGr      12680.7     2480.6   5.112 3.65e-07 ***
## Neighborhood_NridgHt:BedroomAbvGr   -16747.6     4200.6  -3.987 7.05e-05 ***
## Neighborhood_OldTown:BedroomAbvGr     3854.5     3011.3   1.280 0.200755    
## BedroomAbvGr:Neighborhood_Sawyer      3798.3     3491.2   1.088 0.276812    
## Neighborhood_SawyerW:BedroomAbvGr    -7035.9     4547.3  -1.547 0.122033    
## BedroomAbvGr:Neighborhood_Somerst     5433.3     4122.0   1.318 0.187688    
## Neighborhood_SWISU:BedroomAbvGr      10192.0     4798.7   2.124 0.033861 *  
## SaleCondition_Abnorml:BedroomAbvGr    9964.9     3444.9   2.893 0.003882 ** 
## SaleCondition_Normal:BedroomAbvGr     5464.2     2512.1   2.175 0.029790 *  
## HouseStyle_1.5Unf:BedroomAbvGr       14812.1     5294.6   2.798 0.005222 ** 
## BedroomAbvGr:HouseStyle_2Story        5023.9     2010.8   2.498 0.012591 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 22060 on 1346 degrees of freedom
## Multiple R-squared:  0.9288, Adjusted R-squared:  0.9229 
## F-statistic: 155.5 on 113 and 1346 DF,  p-value: < 2.2e-16
#confint(bw_model)
ols_plot_cooksd_bar(bw_model)

bw_model_outliers = ols_plot_cooksd_bar(bw_model, print_plot=F)
bw_model_outliers
## $plot

## 
## $outliers
##      observation cooks_distance
## 4              4    0.005410184
## 57            57    0.003729723
## 59            59    0.002825880
## 114          114    0.006071182
## 119          119    0.006438544
## 145          145    0.021480557
## 154          154    0.010714036
## 164          164    0.011701609
## 167          167    0.004450196
## 172          172    0.004282278
## 179          179    0.010830156
## 186          186    0.045301226
## 209          209    0.002755002
## 219          219    0.005660810
## 252          252    0.016415131
## 262          262    0.026403075
## 292          292    0.004984037
## 305          305    0.028064969
## 314          314    0.130943696
## 321          321    0.004904084
## 322          322    0.002892070
## 323          323    0.003166913
## 325          325    0.009697685
## 331          331    0.004381342
## 336          336    0.011188616
## 337          337    0.003777128
## 349          349    0.004557693
## 350          350    0.009507695
## 363          363    0.004962558
## 378          378    0.012925103
## 384          384    0.008158743
## 385          385    0.011894331
## 412          412    0.010129972
## 441          441    0.021313409
## 474          474    0.007137404
## 478          478    0.004741781
## 497          497    0.015777999
## 524          524    0.019226023
## 530          530    0.390033372
## 560          560    0.004278461
## 567          567    0.005716073
## 582          582    0.010101430
## 584          584    0.005857947
## 589          589    0.113464167
## 592          592    0.002951533
## 608          608    0.005699323
## 609          609    0.097642545
## 633          633    0.022385264
## 640          640    0.004197552
## 641          641    0.005620369
## 643          643    0.004437577
## 665          665    0.028574735
## 682          682    0.010645237
## 686          686    0.008299243
## 689          689    0.035975107
## 693          693    0.007738495
## 703          703    0.003882750
## 707          707    0.011377952
## 717          717    0.004056408
## 729          729    0.002834406
## 739          739    0.013176651
## 745          745    0.004029796
## 770          770    0.074471336
## 775          775    0.004829141
## 790          790    0.005433403
## 799          799    0.025318075
## 804          804    0.057211135
## 811          811    0.006564184
## 819          819    0.004609584
## 826          826    0.008220578
## 829          829    0.009662400
## 841          841    0.007148538
## 849          849    0.003116365
## 869          869    0.003976266
## 876          876    0.027966761
## 878          878    0.003457992
## 886          886    0.014957182
## 898          898    0.011087677
## 899          899    0.041987641
## 926          926    0.004626005
## 940          940    0.004613323
## 962          962    0.004764487
## 1011        1011    0.007002476
## 1025        1025    0.135382474
## 1031        1031    0.003900336
## 1032        1032    0.015002474
## 1047        1047    0.054556361
## 1049        1049    0.007648044
## 1063        1063    0.007004416
## 1066        1066    0.019353034
## 1069        1069    0.020947713
## 1098        1098    0.004166423
## 1108        1108    0.007355873
## 1127        1127    0.004462149
## 1128        1128    0.005038149
## 1143        1143    0.009282800
## 1146        1146    0.004607123
## 1164        1164    0.019520422
## 1169        1169    0.004906509
## 1170        1170    0.007023840
## 1174        1174    0.833437625
## 1176        1176    0.012047450
## 1182        1182    0.017048520
## 1183        1183    0.004707578
## 1217        1217    0.006453425
## 1235        1235    0.003396644
## 1268        1268    0.006111042
## 1269        1269    0.074152041
## 1285        1285    0.003377226
## 1299        1299    0.042553415
## 1325        1325    0.034893774
## 1329        1329    0.031697969
## 1347        1347    0.003035773
## 1360        1360    0.006691130
## 1361        1361    0.007831404
## 1384        1384    0.020707458
## 1387        1387    0.044190835
## 1389        1389    0.006592997
## 1395        1395    0.006465416
## 1397        1397    0.003393152
## 1416        1416    0.004320625
## 1424        1424    0.134788141
## 1433        1433    0.003998709
## 1441        1441    0.004387928
## 1447        1447    0.006412712
## 
## $threshold
## [1] 0.002739726
ols_plot_dffits(bw_model)

ols_plot_diagnostics(bw_model)

ols_plot_resid_fit(bw_model)

ols_plot_resid_pot(bw_model)

ols_pred_rsq(bw_model)
## [1] 0.8959072
plot(bw_fit)

bw_predictions = c(predict(bw_model, newdata = one_encode_test_data_q2))
bw_predictions
##         1         2         3         4         5         6         7         8 
## 113715.15 149365.41 165609.85 180813.88 191126.38 167983.68 165331.39 162322.71 
##         9        10        11        12        13        14        15        16 
## 204526.64 121066.68 193820.30 103791.04  85971.59 146301.75 112857.03 400216.25 
##        17        18        19        20        21        22        23        24 
## 244683.23 288371.79 309735.82 478915.75 342285.59 212931.52 179052.51 143491.88 
##        25        26        27        28        29        30        31        32 
## 200937.93 197724.11 321311.21 249070.18 187494.23 219116.88 193819.43 108778.87 
##        33        34        35        36        37        38        39        40 
## 177902.27 299497.57 285021.16 219029.70 192594.15 151108.77 163374.75 153203.27 
##        41        42        43        44        45        46        47        48 
## 177717.82 136520.22 269711.83 249544.76 221930.35 179692.50 239067.80 202833.85 
##        49        50        51        52        53        54        55        56 
## 144820.04 149715.12 142703.67 166183.86 138375.53 180925.14 164203.17 154673.89 
##        57        58        59        60        61        62        63        64 
## 157883.64 146003.31 201110.75 131030.69 120388.27 179512.96  98913.55 123340.82 
##        65        66        67        68        69        70        71        72 
## 115926.19 116565.86 124566.08 152045.13 131564.57 166258.69 101796.30 103651.96 
##        73        74        75        76        77        78        79        80 
## 133050.68 116932.48 141825.09 102288.24  77392.33 157276.89 217289.68  96162.85 
##        81        82        83        84        85        86        87        88 
## 139032.55 134927.14 204572.57  78073.62 119010.78 143191.18 133299.83 121375.22 
##        89        90        91        92        93        94        95        96 
## 109178.05 122337.57 130451.43 102922.95 140318.73 108831.05 186100.00 128870.79 
##        97        98        99       100       101       102       103       104 
## 113586.56 108994.78  85021.68 145843.20 166265.82 132608.66 133498.70 155638.87 
##       105       106       107       108       109       110       111       112 
## 140736.77 239775.84 104834.25 239591.92 145848.46 153611.16 116659.76 137485.32 
##       113       114       115       116       117       118       119       120 
## 233090.20 141972.17 247864.83 220419.88 176642.49 160956.55 142167.60 187995.80 
##       121       122       123       124       125       126       127       128 
## 155004.82 136093.97 281640.81 230913.33 141704.04  64867.03  99180.75 132077.61 
##       129       130       131       132       133       134       135       136 
##  91134.34 134387.16  73256.49 139991.10 135581.57 134309.36 114396.64 228502.73 
##       137       138       139       140       141       142       143       144 
## 189049.46 238588.56 181480.77 177951.86  38980.25 117174.60  12840.36 281696.05 
##       145       146       147       148       149       150       151       152 
## 238458.31 165451.97 180492.66 215112.99 191504.59 156298.74 159288.03 155569.90 
##       153       154       155       156       157       158       159       160 
## 150971.36 134113.82  79671.58  80907.45  88590.68 109950.16 134598.50 200765.14 
##       161       162       163       164       165       166       167       168 
## 124888.02  99799.29 263650.96 201748.58 126576.99 181968.97 171869.75 259309.81 
##       169       170       171       172       173       174       175       176 
## 180133.65 387498.20 235507.00 279050.65 168631.91 182531.15 183169.72 153998.59 
##       177       178       179       180       181       182       183       184 
## 182150.18 187066.23 180205.99 258795.74 185553.64 257878.54 239489.39 237140.90 
##       185       186       187       188       189       190       191       192 
## 179824.10 163518.78 167072.50 131098.45 140061.42 125430.13 120165.08 118275.26 
##       193       194       195       196       197       198       199       200 
## 118012.86 141757.66 157634.08 140412.89 152581.78 140719.02 122767.40 154191.34 
##       201       202       203       204       205       206       207       208 
## 444143.82 459232.73 356396.31 532761.53 295246.71 322375.65 376520.76 303014.66 
##       209       210       211       212       213       214       215       216 
## 306097.58 331641.01 268822.76 450169.78 312755.15 235291.33 183296.87 212042.51 
##       217       218       219       220       221       222       223       224 
## 231575.08 452599.52 393188.41 365575.80 247689.22 305623.91 182011.00 186879.69 
##       225       226       227       228       229       230       231       232 
## 172108.71 159386.35 176499.92 192203.35 193561.14 199857.86 190882.32 250434.67 
##       233       234       235       236       237       238       239       240 
## 171036.09 178485.73 167764.16 273642.88 167774.04 348233.82 299990.85 244114.53 
##       241       242       243       244       245       246       247       248 
## 282229.03 254726.84 261008.56 272118.37 218409.74 388581.50 208213.42 194804.93 
##       249       250       251       252       253       254       255       256 
## 260119.80 221541.95 263222.55 282530.16 272081.89 225296.12 218006.18 159141.29 
##       257       258       259       260       261       262       263       264 
## 160016.09 119530.80 199351.03 210890.76 158807.11 117840.01 148145.42 225865.10 
##       265       266       267       268       269       270       271       272 
## 224790.60 169097.32 169972.53 189032.81 149528.48 154688.90 133191.24 130673.14 
##       273       274       275       276       277       278       279       280 
## 116531.28 122906.60 130179.00 122539.77 310803.96 226234.54 261548.00 258409.24 
##       281       282       283       284       285       286       287       288 
## 178756.41 177770.29 188272.61 284606.74 230357.31 245271.13 221044.55 230286.23 
##       289       290       291       292       293       294       295       296 
## 154205.21 135497.40 230684.12 121082.44 141821.91 178505.64 172988.98 123807.10 
##       297       298       299       300       301       302       303       304 
## 113049.61 142535.83 169034.38 168234.41 153964.40 137946.74 178134.05 125395.71 
##       305       306       307       308       309       310       311       312 
## 161277.64 175876.85 205367.59 130875.59 176510.98 161001.64 122599.73 135814.36 
##       313       314       315       316       317       318       319       320 
## 131376.39 152165.06 141711.61 122700.76 120659.47 135825.48 121406.34 179822.40 
##       321       322       323       324       325       326       327       328 
## 116953.95  68130.34 142490.68  99426.29 108263.73 165465.78 159440.21  48750.48 
##       329       330       331       332       333       334       335       336 
## 109121.64 107535.01 186589.81 143881.55 160944.23 154274.38 131211.83 133479.48 
##       337       338       339       340       341       342       343       344 
## 127146.38 114647.17 119276.59 128493.26 123650.68 136699.29 141490.26 129041.16 
##       345       346       347       348       349       350       351       352 
## 149686.78 115856.11 146813.04 143519.47 111757.85 106443.20  84203.35  91802.42 
##       353       354       355       356       357       358       359       360 
##  99542.78  92216.68  61365.74 100819.47 107364.28 163659.06 138558.18  72164.69 
##       361       362       363       364       365       366       367       368 
##  97588.87 141926.82  49439.06 139487.27 140042.88  91109.64 107011.33 130754.78 
##       369       370       371       372       373       374       375       376 
## 152050.31 126894.53 157324.05  83011.65 167864.23 115359.48 106867.65 132241.45 
##       377       378       379       380       381       382       383       384 
##  58664.60 145351.61 124740.93 139551.91 153168.56 126835.61 120518.47 149208.47 
##       385       386       387       388       389       390       391       392 
## 137076.92 154354.82 206120.02  62433.31 130917.15 122264.24 139170.64 122340.71 
##       393       394       395       396       397       398       399       400 
## 122674.44 201491.57 212321.10 225019.02 197156.14 155955.94 128981.63 152911.51 
##       401       402       403       404       405       406       407       408 
## 125277.23 278631.84 267217.45 267325.30 297405.55 285288.08 222217.83 264134.41 
##       409       410       411       412       413       414       415       416 
## 199043.40 215035.43 226032.51 179342.27 239591.36 139307.15 205462.14 190314.67 
##       417       418       419       420       421       422       423       424 
## 207916.96 202080.64 125598.42 134805.20 227503.21 254692.43 193695.13 204451.39 
##       425       426       427       428       429       430       431       432 
## 232819.78 257291.26 209544.17 245966.63 176339.38 119424.92 126730.79  75575.49 
##       433       434       435       436       437       438       439       440 
## 138313.87 132810.45 136770.06 118141.84 118476.58 125068.34 165026.84 157072.58 
##       441       442       443       444       445       446       447       448 
## 188310.58 141873.32 211680.68 150990.51 204284.02 181374.50 233156.94 113482.47 
##       449       450       451       452       453       454       455       456 
## 141761.36 122929.80 234465.07 351099.58 197854.79  68369.90 331929.01  86912.35 
##       457       458       459       460       461       462       463       464 
## 232119.62 148023.72 174106.58 160579.92 336685.42 284270.79 248907.19 240905.22 
##       465       466       467       468       469       470       471       472 
## 213541.72 341541.24 104770.98 154779.65 119958.26 147728.38 142500.38 125057.99 
##       473       474       475       476       477       478       479       480 
## 124606.71 168988.37 158978.13 164427.02 180311.68 175227.77 282086.43 191306.65 
##       481       482       483       484       485       486       487       488 
## 171204.38 197606.12 221575.85 361069.35 366230.63 192079.08 314776.31 274844.70 
##       489       490       491       492       493       494       495       496 
## 250239.59 179773.42 261922.96 224719.24 172640.44 196284.35 123176.29 297230.97 
##       497       498       499       500       501       502       503       504 
## 177263.40 265837.25 147974.81 102060.03 136854.79 114451.93 104665.56 102013.10 
##       505       506       507       508       509       510       511       512 
## 127686.21 142678.44 263659.46 390547.51 390808.30 382848.00 429551.41 374277.35 
##       513       514       515       516       517       518       519       520 
## 241015.02 319254.23 524462.37 284281.57 372854.72 367176.75 379522.43 230039.12 
##       521       522       523       524       525       526       527       528 
## 360372.82 217897.49 203938.08 177707.69 191373.84 209898.48 169922.55 174299.85 
##       529       530       531       532       533       534       535       536 
## 195610.65 206500.22 230219.30 193848.72 178479.42 219485.99 181964.28 252348.76 
##       537       538       539       540       541       542       543       544 
## 306654.42 302842.29 254719.29 298464.30 259659.70 254309.12 264292.88 287648.63 
##       545       546       547       548       549       550       551       552 
## 224424.85 211814.80 255214.36 199942.90 191152.95 196611.90 144106.88 156797.30 
##       553       554       555       556       557       558       559       560 
## 163819.12 180498.10 199083.30 184586.06 194725.40 133040.29 136766.52 126086.10 
##       561       562       563       564       565       566       567       568 
## 115364.24 199855.49 147966.44 299341.40 352537.11 171259.70 152063.79 155415.34 
##       569       570       571       572       573       574       575       576 
## 170147.83 275839.05 224109.19 243868.71 264180.89 167486.82 227245.88 213118.75 
##       577       578       579       580       581       582       583       584 
## 214777.89 325737.81 225170.74 375525.33 282827.76 207038.05 152901.10 152032.76 
##       585       586       587       588       589       590       591       592 
## 187702.12 139560.95 132242.71 147116.56 159313.03 153847.49 110761.85 134579.68 
##       593       594       595       596       597       598       599       600 
## 144121.49  73800.03 149787.41 158129.92 113463.96 191226.89 143793.09 161290.39 
##       601       602       603       604       605       606       607       608 
## 168880.25 132228.36 120221.20 130875.69 120566.06 176410.99 161610.69 156957.01 
##       609       610       611       612       613       614       615       616 
## 100115.96  90217.46  93113.92 148521.76 150033.92 180142.24 156401.08 116730.99 
##       617       618       619       620       621       622       623       624 
## 142314.72 126189.39 141115.38 129550.16 128330.78 144537.95 130501.44 117201.79 
##       625       626       627       628       629       630       631       632 
## 117318.82 138123.17 120826.39  94370.91  90182.60 110072.97 106498.76 122927.38 
##       633       634       635       636       637       638       639       640 
## 141777.62 142680.82 145419.86  96744.33  88975.47 119370.76  65409.23  89660.01 
##       641       642       643       644       645       646       647       648 
## 124534.90 111066.45 115018.73 142062.15 107993.98  74328.65 192268.96 122375.26 
##       649       650       651       652       653       654       655       656 
## 105915.20 123819.88 158670.90 144220.26 107863.72 126287.53 166028.12 122735.11 
##       657       658       659       660       661       662       663       664 
## 142875.77 142215.29 106327.19 119308.41  77484.73  96211.33 113399.12 181206.68 
##       665       666       667       668       669       670       671       672 
## 112413.53 176958.77 113313.71 100118.93 102014.90 127201.78 176891.16 136696.16 
##       673       674       675       676       677       678       679       680 
## 124852.18 133442.35 120995.80  84281.67 119122.54 124029.88 161439.94 134546.93 
##       681       682       683       684       685       686       687       688 
## 149142.68 116315.33 144731.90  72740.08 133325.12 169387.35 192034.32 171150.41 
##       689       690       691       692       693       694       695       696 
## 125438.65 229585.07 121526.75 183780.87 151047.78 105182.39 137310.33 256537.98 
##       697       698       699       700       701       702       703       704 
## 224860.61 227034.09 232748.03 191384.20 232104.53 321645.49 316542.70 229855.06 
##       705       706       707       708       709       710       711       712 
## 217778.88 146487.97 209554.63 200497.30 189626.44 217039.80 149827.04 138349.89 
##       713       714       715       716       717       718       719       720 
## 180579.67 232883.14 269642.39 263139.75 250967.09 218125.05 141957.77 191779.74 
##       721       722       723       724       725       726       727       728 
## 193855.15 210983.52 189325.77 107399.18 134596.72 150759.96 155869.90 144021.67 
##       729       730       731       732       733       734       735       736 
## 246170.36 105021.04  94491.78  76884.44 133669.01 115120.59  86301.46  87270.90 
##       737       738       739       740       741       742       743       744 
## 112913.74 154589.45 166098.29 158009.72 146759.31 219089.68 153762.60 196855.97 
##       745       746       747       748       749       750       751       752 
## 128583.45 153365.59 229537.08 283552.13 216878.80 113908.03 126485.10 114099.19 
##       753       754       755       756       757       758       759       760 
##  85211.19 123515.51  99324.21 152168.82  44328.83  77600.49  84327.21  84794.51 
##       761       762       763       764       765       766       767       768 
## 331929.01 284175.46 267710.11 203231.96 133675.09 166373.40 228119.60 242818.52 
##       769       770       771       772       773       774       775       776 
## 261536.61 151561.17 217785.30 185248.35 167670.01 229868.50 220788.32 262125.75 
##       777       778       779       780       781       782       783       784 
## 300641.75 204698.56 113734.69 173387.88 126108.67 110870.34 121466.23  91665.21 
##       785       786       787       788       789       790       791       792 
## 105892.91 129723.23 126310.79 125247.50 103781.53 115252.49 316525.38 167044.16 
##       793       794       795       796       797       798       799       800 
## 155183.48 173271.54 173239.77 176155.36 199544.84 164674.79 166760.39  74863.80 
##       801       802       803       804       805       806       807       808 
## 186574.87 218733.63 380808.91 426716.46 218739.34 299678.80 373325.16 402615.40 
##       809       810       811       812       813       814       815       816 
## 158576.84 185607.52 218812.53 211296.76 151407.63 192865.51 178305.43 181568.95 
##       817       818       819       820       821       822       823       824 
## 175533.05 152176.65 126191.28 105645.09 165705.64 184808.69 101191.44 111004.11 
##       825       826       827       828       829       830       831       832 
## 135129.26 129751.92 339641.47 271449.64 413169.64 471625.91 376696.41 437016.14 
##       833       834       835       836       837       838       839       840 
## 483425.35 400278.45 516596.25 343787.10 344409.09 323760.72 380035.93 349623.21 
##       841       842       843       844       845       846       847       848 
## 307163.10 232759.40 249178.72 272287.12 229746.13 200752.23 194397.42 223317.47 
##       849       850       851       852       853       854       855       856 
## 287511.01 219027.86 194545.99 178648.33 176831.62 176054.13 182966.31 222975.09 
##       857       858       859       860       861       862       863       864 
## 182943.89 178426.71 187867.07 176171.18 233438.25 172901.22 207487.97 194222.48 
##       865       866       867       868       869       870       871       872 
## 216368.97 184121.67 203026.90 207844.36 187632.56 173062.94 337391.22 404545.13 
##       873       874       875       876       877       878       879       880 
## 323403.92 267272.71 270872.68 296547.80 198658.44 265736.24 231576.78 392302.62 
##       881       882       883       884       885       886       887       888 
## 252745.28 237370.61 225263.88 227011.13 248720.35 206316.44 192893.38 251075.89 
##       889       890       891       892       893       894       895       896 
## 193415.09 308775.39 276780.85 266405.17 256889.50 116761.21 131862.48 135742.70 
##       897       898       899       900       901       902       903       904 
## 181165.80 188772.19 145216.57 138144.03 145809.12 310225.88 144851.43 156481.45 
##       905       906       907       908       909       910       911       912 
## 217768.13 199574.48 263407.61 224659.99 255106.23 173797.26 166349.30 183751.86 
##       913       914       915       916       917       918       919       920 
## 270856.93 286263.92 244792.83 315821.23 368730.51 155237.36 201077.79 135855.58 
##       921       922       923       924       925       926       927       928 
## 161419.37 200381.77 211165.41 227514.56 161102.16 134962.36 139046.17 130610.04 
##       929       930       931       932       933       934       935       936 
## 123580.00 147607.78 128304.92 114208.66 180743.72 149429.41 169127.25 154386.12 
##       937       938       939       940       941       942       943       944 
## 204141.84 134176.38  48027.95  54591.56  99884.41 128097.73 155350.06 148726.79 
##       945       946       947       948       949       950       951       952 
## 158893.01 145125.76 127168.31 136639.41 124295.95 173061.29 125381.35 135317.51 
##       953       954       955       956       957       958       959       960 
## 132872.16 148965.41 145026.15 131855.99 137135.20 135782.68 118203.52 139117.57 
##       961       962       963       964       965       966       967       968 
## 147589.58 122567.55 119202.87 151561.39 175020.67 124614.63 117332.29 182447.99 
##       969       970       971       972       973       974       975       976 
## 124514.21 143920.75 128417.68 138843.07 132764.50 135638.92 147144.55 113447.03 
##       977       978       979       980       981       982       983       984 
## 109174.12 126992.73 113109.84 109810.93 111985.17 104062.67 119614.85 128763.01 
##       985       986       987       988       989       990       991       992 
##  73497.21 113375.45 189362.02 123683.73  86552.18 142561.85 125930.98 194112.26 
##       993       994       995       996       997       998       999      1000 
##  91132.98 144334.57 144260.56 125580.00 117618.70 121748.40  90224.90 150652.58 
##      1001      1002      1003      1004      1005      1006      1007      1008 
## 102797.45 124645.59 135098.70 149037.65 131280.87  92113.28 157112.95 108066.16 
##      1009      1010      1011      1012      1013      1014      1015      1016 
## 113815.24 236795.23 212288.10 193209.77 111547.14 100680.41 223567.75 125810.75 
##      1017      1018      1019      1020      1021      1022      1023      1024 
## 122815.79 161903.26 117095.31 159864.47 127249.09 146010.64 112123.05 142164.67 
##      1025      1026      1027      1028      1029      1030      1031      1032 
## 122214.34 153430.54 224465.09 186015.44 161518.90 150879.90 104207.80 192836.21 
##      1033      1034      1035      1036      1037      1038      1039      1040 
## 181267.29 184748.54 123936.68 278095.20 144848.08 110894.41  99426.86 108630.75 
##      1041      1042      1043      1044      1045      1046      1047      1048 
## 130554.94 150034.02 105060.80 222643.92 226745.32 249773.32 305574.89 248468.36 
##      1049      1050      1051      1052      1053      1054      1055      1056 
## 210154.46 216196.26 178119.44 198952.11 215226.20 288031.20 147755.67 182383.18 
##      1057      1058      1059      1060      1061      1062      1063      1064 
## 138026.12 156093.82 210608.68 205682.79 193176.56 221185.01 127447.87 144288.45 
##      1065      1066      1067      1068      1069      1070      1071      1072 
## 146668.82 135476.17 139325.31 125094.26 142602.48 112623.04 230012.50 226188.08 
##      1073      1074      1075      1076      1077      1078      1079      1080 
## 193637.47 222631.72 296988.85 247155.80 216360.70 196616.27 188943.90 185874.05 
##      1081      1082      1083      1084      1085      1086      1087      1088 
## 191056.35 160983.41 113451.65 101409.51 154556.14 130967.02 139961.60 124967.56 
##      1089      1090      1091      1092      1093      1094      1095      1096 
## 151132.75 191364.20 125420.05 118882.11  94594.39 113116.22 140363.75  78454.99 
##      1097      1098      1099      1100      1101      1102      1103      1104 
##  95201.45 186334.60 139049.39 177384.55 171751.29 146187.14 154296.85 199360.09 
##      1105      1106      1107      1108      1109      1110      1111      1112 
## 155661.20 173791.13 142267.71 199133.84 202966.45 113971.95 176173.64 176248.41 
##      1113      1114      1115      1116      1117      1118      1119      1120 
## 223717.52 376371.16 114612.51 132339.89 196775.30  72798.56  55827.31 153270.30 
##      1121      1122      1123      1124      1125      1126      1127      1128 
## 105254.16 100753.95 309204.52 180898.90 165404.49 221932.37 194621.83 142978.87 
##      1129      1130      1131      1132      1133      1134      1135      1136 
## 153090.44 234404.26 273502.35 241759.19 277046.09 179525.21 205494.16 300494.68 
##      1137      1138      1139      1140      1141      1142      1143      1144 
## 184568.76 286851.50 323624.95 204015.44 183985.30  87465.57  86811.70  79726.96 
##      1145      1146      1147      1148      1149      1150      1151      1152 
##  89640.29 151597.16 193161.19 206169.04 141684.13 110862.67  89991.27 149083.31 
##      1153      1154      1155      1156      1157      1158      1159      1160 
## 131909.34 117076.35 162325.78 150483.40 158684.27 153934.53 185722.30 177714.07 
##      1161      1162      1163      1164      1165      1166      1167      1168 
## 174501.46 173365.30 239153.81 303241.06 344488.03 163414.62 172886.95 473661.44 
##      1169      1170      1171      1172      1173      1174      1175      1176 
## 508471.19 363667.65 462567.92 446028.71 298336.26 390961.65 161206.57 175069.37 
##      1177      1178      1179      1180      1181      1182      1183      1184 
## 171711.13 301015.80 200262.13 142865.09 119691.66 180979.90 109996.73 115474.53 
##      1185      1186      1187      1188      1189      1190      1191      1192 
##  98971.83 104049.48  99398.76 150121.91 144795.17 148497.31 139654.98 434212.18 
##      1193      1194      1195      1196      1197      1198      1199      1200 
## 308090.53 221874.61 380177.31 339933.02 358648.65 357495.78 313548.63 363609.49 
##      1201      1202      1203      1204      1205      1206      1207      1208 
## 361651.83 367239.29 300562.29 274134.44 376549.86 305161.45 179390.79 189288.13 
##      1209      1210      1211      1212      1213      1214      1215      1216 
## 167665.77 294854.17 189788.06 221122.96 219255.94 221792.60 167453.13 192363.02 
##      1217      1218      1219      1220      1221      1222      1223      1224 
## 181068.14 280789.56 259428.00 284695.98 400187.14 321360.52 546154.15 307936.70 
##      1225      1226      1227      1228      1229      1230      1231      1232 
## 362054.53 279357.72 304404.60 232298.52 208893.37 420532.81 196379.42 118991.02 
##      1233      1234      1235      1236      1237      1238      1239      1240 
## 186266.59 123009.80 184866.24 177692.75 166608.38 181568.67 189993.59 159474.44 
##      1241      1242      1243      1244      1245      1246      1247      1248 
## 148300.60 134060.05 165527.21 152378.50 113375.40 112669.89 140347.85 118087.60 
##      1249      1250      1251      1252      1253      1254      1255      1256 
## 104923.79 119074.61 421413.91 372008.03 160488.00 149539.68 164919.61 142478.09 
##      1257      1258      1259      1260      1261      1262      1263      1264 
## 205657.57 227343.63 162146.45 178245.57 140521.25 142639.98 153706.23 126057.46 
##      1265      1266      1267      1268      1269      1270      1271      1272 
## 132946.94 133743.76 182711.26 173411.05 138116.35 135352.58 140226.56 117335.69 
##      1273      1274      1275      1276      1277      1278      1279      1280 
## 158527.75 159959.78 131431.79 124129.94 116445.79 148558.19 171937.67 134545.69 
##      1281      1282      1283      1284      1285      1286      1287      1288 
## 133390.34 154581.42 138789.11 160945.04 150099.07 141301.61 163098.09 120254.42 
##      1289      1290      1291      1292      1293      1294      1295      1296 
## 119499.75 140372.76 138684.78 190797.92 154404.54 227178.16 138987.75  84619.99 
##      1297      1298      1299      1300      1301      1302      1303      1304 
##  88657.96  99204.53 123440.93  96107.60 149256.29 146238.43 196222.05 179424.30 
##      1305      1306      1307      1308      1309      1310      1311      1312 
## 218182.00 114391.03 101687.33 131479.39 116793.48 163276.37 122996.01 113927.23 
##      1313      1314      1315      1316      1317      1318      1319      1320 
## 133778.65 123531.09  90919.66 151048.08 138276.06 112813.76 103892.16 107595.24 
##      1321      1322      1323      1324      1325      1326      1327      1328 
##  93147.21  84488.48  62875.28 110315.95  98246.10  94399.19 118458.94  67103.89 
##      1329      1330      1331      1332      1333      1334      1335      1336 
## 134602.18  88029.21 107543.90  42707.66 172344.90  76274.60 109666.72 105131.46 
##      1337      1338      1339      1340      1341      1342      1343      1344 
## 220987.59 105605.48 109692.97  69660.18  94966.48 139678.90 184275.83 141937.66 
##      1345      1346      1347      1348      1349      1350      1351      1352 
## 106978.29  98929.85 168462.70 138085.81 145069.49 127159.59 167995.70 159090.74 
##      1353      1354      1355      1356      1357      1358      1359      1360 
## 164226.12 164217.41 111961.08 243904.26 142124.03 138163.26 224775.26 125178.78 
##      1361      1362      1363      1364      1365      1366      1367      1368 
## 104422.34 185131.18 113052.01 163506.67 155103.05 129870.08 133593.42 237218.58 
##      1369      1370      1371      1372      1373      1374      1375      1376 
## 217330.88 239582.83 165305.85 246061.76 273179.94 219205.36 211128.28 189613.35 
##      1377      1378      1379      1380      1381      1382      1383      1384 
## 178579.45 145989.76 181007.09 197951.81 194740.51 222886.51 137984.55 177279.69 
##      1385      1386      1387      1388      1389      1390      1391      1392 
## 114454.09 197247.64 189075.30 211980.27 211631.11 265734.12 242035.16 233096.58 
##      1393      1394      1395      1396      1397      1398      1399      1400 
## 238875.70 141704.04 203207.70 214568.93 189044.08 206706.14 134698.41 125604.14 
##      1401      1402      1403      1404      1405      1406      1407      1408 
## 129017.53 174989.31 123009.36 176852.11 142133.62 152410.83  74978.46 144412.26 
##      1409      1410      1411      1412      1413      1414      1415      1416 
## 114413.28 145467.54  86735.08  24369.74 119135.58 127476.65 125180.96 168402.49 
##      1417      1418      1419      1420      1421      1422      1423      1424 
## 111988.15 159713.61 124632.88 103310.37 162341.88 175646.30 187242.10 217138.04 
##      1425      1426      1427      1428      1429      1430      1431      1432 
## 184504.50 216127.48 108715.38 128898.57  60086.12  61963.19 154093.51  52289.91 
##      1433      1434      1435      1436      1437      1438      1439      1440 
## 109080.88  53242.60 350229.09 281697.37 189556.81 154743.02 197668.84 159906.99 
##      1441      1442      1443      1444      1445      1446      1447      1448 
##  39136.60 203538.20 315701.33 328143.85  92179.79 211194.30 115605.22 125426.56 
##      1449      1450      1451      1452      1453      1454      1455      1456 
## 147882.54  77671.09  87407.27 143439.28  92544.49  79817.32  81012.39  93144.96 
##      1457      1458      1459 
## 126589.80 111054.42 195262.98
bw_submission = data.frame(Id= one_encode_test_data_q2$Id, SalePrice=bw_predictions)
bw_submission
##        Id SalePrice
## 1    1461 113715.15
## 2    1462 149365.41
## 3    1463 165609.85
## 4    1464 180813.88
## 5    1465 191126.38
## 6    1466 167983.68
## 7    1467 165331.39
## 8    1468 162322.71
## 9    1469 204526.64
## 10   1470 121066.68
## 11   1471 193820.30
## 12   1472 103791.04
## 13   1473  85971.59
## 14   1474 146301.75
## 15   1475 112857.03
## 16   1476 400216.25
## 17   1477 244683.23
## 18   1478 288371.79
## 19   1479 309735.82
## 20   1480 478915.75
## 21   1481 342285.59
## 22   1482 212931.52
## 23   1483 179052.51
## 24   1484 143491.88
## 25   1485 200937.93
## 26   1486 197724.11
## 27   1487 321311.21
## 28   1488 249070.18
## 29   1489 187494.23
## 30   1490 219116.88
## 31   1491 193819.43
## 32   1492 108778.87
## 33   1493 177902.27
## 34   1494 299497.57
## 35   1495 285021.16
## 36   1496 219029.70
## 37   1497 192594.15
## 38   1498 151108.77
## 39   1499 163374.75
## 40   1500 153203.27
## 41   1501 177717.82
## 42   1502 136520.22
## 43   1503 269711.83
## 44   1504 249544.76
## 45   1505 221930.35
## 46   1506 179692.50
## 47   1507 239067.80
## 48   1508 202833.85
## 49   1509 144820.04
## 50   1510 149715.12
## 51   1511 142703.67
## 52   1512 166183.86
## 53   1513 138375.53
## 54   1514 180925.14
## 55   1515 164203.17
## 56   1516 154673.89
## 57   1517 157883.64
## 58   1518 146003.31
## 59   1519 201110.75
## 60   1520 131030.69
## 61   1521 120388.27
## 62   1522 179512.96
## 63   1523  98913.55
## 64   1524 123340.82
## 65   1525 115926.19
## 66   1526 116565.86
## 67   1527 124566.08
## 68   1528 152045.13
## 69   1529 131564.57
## 70   1530 166258.69
## 71   1531 101796.30
## 72   1532 103651.96
## 73   1533 133050.68
## 74   1534 116932.48
## 75   1535 141825.09
## 76   1536 102288.24
## 77   1537  77392.33
## 78   1538 157276.89
## 79   1539 217289.68
## 80   1540  96162.85
## 81   1541 139032.55
## 82   1542 134927.14
## 83   1543 204572.57
## 84   1544  78073.62
## 85   1545 119010.78
## 86   1546 143191.18
## 87   1547 133299.83
## 88   1548 121375.22
## 89   1549 109178.05
## 90   1550 122337.57
## 91   1551 130451.43
## 92   1552 102922.95
## 93   1553 140318.73
## 94   1554 108831.05
## 95   1555 186100.00
## 96   1556 128870.79
## 97   1557 113586.56
## 98   1558 108994.78
## 99   1559  85021.68
## 100  1560 145843.20
## 101  1561 166265.82
## 102  1562 132608.66
## 103  1563 133498.70
## 104  1564 155638.87
## 105  1565 140736.77
## 106  1566 239775.84
## 107  1567 104834.25
## 108  1568 239591.92
## 109  1569 145848.46
## 110  1570 153611.16
## 111  1571 116659.76
## 112  1572 137485.32
## 113  1573 233090.20
## 114  1574 141972.17
## 115  1575 247864.83
## 116  1576 220419.88
## 117  1577 176642.49
## 118  1578 160956.55
## 119  1579 142167.60
## 120  1580 187995.80
## 121  1581 155004.82
## 122  1582 136093.97
## 123  1583 281640.81
## 124  1584 230913.33
## 125  1585 141704.04
## 126  1586  64867.03
## 127  1587  99180.75
## 128  1588 132077.61
## 129  1589  91134.34
## 130  1590 134387.16
## 131  1591  73256.49
## 132  1592 139991.10
## 133  1593 135581.57
## 134  1594 134309.36
## 135  1595 114396.64
## 136  1596 228502.73
## 137  1597 189049.46
## 138  1598 238588.56
## 139  1599 181480.77
## 140  1600 177951.86
## 141  1601  38980.25
## 142  1602 117174.60
## 143  1603  12840.36
## 144  1604 281696.05
## 145  1605 238458.31
## 146  1606 165451.97
## 147  1607 180492.66
## 148  1608 215112.99
## 149  1609 191504.59
## 150  1610 156298.74
## 151  1611 159288.03
## 152  1612 155569.90
## 153  1613 150971.36
## 154  1614 134113.82
## 155  1615  79671.58
## 156  1616  80907.45
## 157  1617  88590.68
## 158  1618 109950.16
## 159  1619 134598.50
## 160  1620 200765.14
## 161  1621 124888.02
## 162  1622  99799.29
## 163  1623 263650.96
## 164  1624 201748.58
## 165  1625 126576.99
## 166  1626 181968.97
## 167  1627 171869.75
## 168  1628 259309.81
## 169  1629 180133.65
## 170  1630 387498.20
## 171  1631 235507.00
## 172  1632 279050.65
## 173  1633 168631.91
## 174  1634 182531.15
## 175  1635 183169.72
## 176  1636 153998.59
## 177  1637 182150.18
## 178  1638 187066.23
## 179  1639 180205.99
## 180  1640 258795.74
## 181  1641 185553.64
## 182  1642 257878.54
## 183  1643 239489.39
## 184  1644 237140.90
## 185  1645 179824.10
## 186  1646 163518.78
## 187  1647 167072.50
## 188  1648 131098.45
## 189  1649 140061.42
## 190  1650 125430.13
## 191  1651 120165.08
## 192  1652 118275.26
## 193  1653 118012.86
## 194  1654 141757.66
## 195  1655 157634.08
## 196  1656 140412.89
## 197  1657 152581.78
## 198  1658 140719.02
## 199  1659 122767.40
## 200  1660 154191.34
## 201  1661 444143.82
## 202  1662 459232.73
## 203  1663 356396.31
## 204  1664 532761.53
## 205  1665 295246.71
## 206  1666 322375.65
## 207  1667 376520.76
## 208  1668 303014.66
## 209  1669 306097.58
## 210  1670 331641.01
## 211  1671 268822.76
## 212  1672 450169.78
## 213  1673 312755.15
## 214  1674 235291.33
## 215  1675 183296.87
## 216  1676 212042.51
## 217  1677 231575.08
## 218  1678 452599.52
## 219  1679 393188.41
## 220  1680 365575.80
## 221  1681 247689.22
## 222  1682 305623.91
## 223  1683 182011.00
## 224  1684 186879.69
## 225  1685 172108.71
## 226  1686 159386.35
## 227  1687 176499.92
## 228  1688 192203.35
## 229  1689 193561.14
## 230  1690 199857.86
## 231  1691 190882.32
## 232  1692 250434.67
## 233  1693 171036.09
## 234  1694 178485.73
## 235  1695 167764.16
## 236  1696 273642.88
## 237  1697 167774.04
## 238  1698 348233.82
## 239  1699 299990.85
## 240  1700 244114.53
## 241  1701 282229.03
## 242  1702 254726.84
## 243  1703 261008.56
## 244  1704 272118.37
## 245  1705 218409.74
## 246  1706 388581.50
## 247  1707 208213.42
## 248  1708 194804.93
## 249  1709 260119.80
## 250  1710 221541.95
## 251  1711 263222.55
## 252  1712 282530.16
## 253  1713 272081.89
## 254  1714 225296.12
## 255  1715 218006.18
## 256  1716 159141.29
## 257  1717 160016.09
## 258  1718 119530.80
## 259  1719 199351.03
## 260  1720 210890.76
## 261  1721 158807.11
## 262  1722 117840.01
## 263  1723 148145.42
## 264  1724 225865.10
## 265  1725 224790.60
## 266  1726 169097.32
## 267  1727 169972.53
## 268  1728 189032.81
## 269  1729 149528.48
## 270  1730 154688.90
## 271  1731 133191.24
## 272  1732 130673.14
## 273  1733 116531.28
## 274  1734 122906.60
## 275  1735 130179.00
## 276  1736 122539.77
## 277  1737 310803.96
## 278  1738 226234.54
## 279  1739 261548.00
## 280  1740 258409.24
## 281  1741 178756.41
## 282  1742 177770.29
## 283  1743 188272.61
## 284  1744 284606.74
## 285  1745 230357.31
## 286  1746 245271.13
## 287  1747 221044.55
## 288  1748 230286.23
## 289  1749 154205.21
## 290  1750 135497.40
## 291  1751 230684.12
## 292  1752 121082.44
## 293  1753 141821.91
## 294  1754 178505.64
## 295  1755 172988.98
## 296  1756 123807.10
## 297  1757 113049.61
## 298  1758 142535.83
## 299  1759 169034.38
## 300  1760 168234.41
## 301  1761 153964.40
## 302  1762 137946.74
## 303  1763 178134.05
## 304  1764 125395.71
## 305  1765 161277.64
## 306  1766 175876.85
## 307  1767 205367.59
## 308  1768 130875.59
## 309  1769 176510.98
## 310  1770 161001.64
## 311  1771 122599.73
## 312  1772 135814.36
## 313  1773 131376.39
## 314  1774 152165.06
## 315  1775 141711.61
## 316  1776 122700.76
## 317  1777 120659.47
## 318  1778 135825.48
## 319  1779 121406.34
## 320  1780 179822.40
## 321  1781 116953.95
## 322  1782  68130.34
## 323  1783 142490.68
## 324  1784  99426.29
## 325  1785 108263.73
## 326  1786 165465.78
## 327  1787 159440.21
## 328  1788  48750.48
## 329  1789 109121.64
## 330  1790 107535.01
## 331  1791 186589.81
## 332  1792 143881.55
## 333  1793 160944.23
## 334  1794 154274.38
## 335  1795 131211.83
## 336  1796 133479.48
## 337  1797 127146.38
## 338  1798 114647.17
## 339  1799 119276.59
## 340  1800 128493.26
## 341  1801 123650.68
## 342  1802 136699.29
## 343  1803 141490.26
## 344  1804 129041.16
## 345  1805 149686.78
## 346  1806 115856.11
## 347  1807 146813.04
## 348  1808 143519.47
## 349  1809 111757.85
## 350  1810 106443.20
## 351  1811  84203.35
## 352  1812  91802.42
## 353  1813  99542.78
## 354  1814  92216.68
## 355  1815  61365.74
## 356  1816 100819.47
## 357  1817 107364.28
## 358  1818 163659.06
## 359  1819 138558.18
## 360  1820  72164.69
## 361  1821  97588.87
## 362  1822 141926.82
## 363  1823  49439.06
## 364  1824 139487.27
## 365  1825 140042.88
## 366  1826  91109.64
## 367  1827 107011.33
## 368  1828 130754.78
## 369  1829 152050.31
## 370  1830 126894.53
## 371  1831 157324.05
## 372  1832  83011.65
## 373  1833 167864.23
## 374  1834 115359.48
## 375  1835 106867.65
## 376  1836 132241.45
## 377  1837  58664.60
## 378  1838 145351.61
## 379  1839 124740.93
## 380  1840 139551.91
## 381  1841 153168.56
## 382  1842 126835.61
## 383  1843 120518.47
## 384  1844 149208.47
## 385  1845 137076.92
## 386  1846 154354.82
## 387  1847 206120.02
## 388  1848  62433.31
## 389  1849 130917.15
## 390  1850 122264.24
## 391  1851 139170.64
## 392  1852 122340.71
## 393  1853 122674.44
## 394  1854 201491.57
## 395  1855 212321.10
## 396  1856 225019.02
## 397  1857 197156.14
## 398  1858 155955.94
## 399  1859 128981.63
## 400  1860 152911.51
## 401  1861 125277.23
## 402  1862 278631.84
## 403  1863 267217.45
## 404  1864 267325.30
## 405  1865 297405.55
## 406  1866 285288.08
## 407  1867 222217.83
## 408  1868 264134.41
## 409  1869 199043.40
## 410  1870 215035.43
## 411  1871 226032.51
## 412  1872 179342.27
## 413  1873 239591.36
## 414  1874 139307.15
## 415  1875 205462.14
## 416  1876 190314.67
## 417  1877 207916.96
## 418  1878 202080.64
## 419  1879 125598.42
## 420  1880 134805.20
## 421  1881 227503.21
## 422  1882 254692.43
## 423  1883 193695.13
## 424  1884 204451.39
## 425  1885 232819.78
## 426  1886 257291.26
## 427  1887 209544.17
## 428  1888 245966.63
## 429  1889 176339.38
## 430  1890 119424.92
## 431  1891 126730.79
## 432  1892  75575.49
## 433  1893 138313.87
## 434  1894 132810.45
## 435  1895 136770.06
## 436  1896 118141.84
## 437  1897 118476.58
## 438  1898 125068.34
## 439  1899 165026.84
## 440  1900 157072.58
## 441  1901 188310.58
## 442  1902 141873.32
## 443  1903 211680.68
## 444  1904 150990.51
## 445  1905 204284.02
## 446  1906 181374.50
## 447  1907 233156.94
## 448  1908 113482.47
## 449  1909 141761.36
## 450  1910 122929.80
## 451  1911 234465.07
## 452  1912 351099.58
## 453  1913 197854.79
## 454  1914  68369.90
## 455  1915 331929.01
## 456  1916  86912.35
## 457  1917 232119.62
## 458  1918 148023.72
## 459  1919 174106.58
## 460  1920 160579.92
## 461  1921 336685.42
## 462  1922 284270.79
## 463  1923 248907.19
## 464  1924 240905.22
## 465  1925 213541.72
## 466  1926 341541.24
## 467  1927 104770.98
## 468  1928 154779.65
## 469  1929 119958.26
## 470  1930 147728.38
## 471  1931 142500.38
## 472  1932 125057.99
## 473  1933 124606.71
## 474  1934 168988.37
## 475  1935 158978.13
## 476  1936 164427.02
## 477  1937 180311.68
## 478  1938 175227.77
## 479  1939 282086.43
## 480  1940 191306.65
## 481  1941 171204.38
## 482  1942 197606.12
## 483  1943 221575.85
## 484  1944 361069.35
## 485  1945 366230.63
## 486  1946 192079.08
## 487  1947 314776.31
## 488  1948 274844.70
## 489  1949 250239.59
## 490  1950 179773.42
## 491  1951 261922.96
## 492  1952 224719.24
## 493  1953 172640.44
## 494  1954 196284.35
## 495  1955 123176.29
## 496  1956 297230.97
## 497  1957 177263.40
## 498  1958 265837.25
## 499  1959 147974.81
## 500  1960 102060.03
## 501  1961 136854.79
## 502  1962 114451.93
## 503  1963 104665.56
## 504  1964 102013.10
## 505  1965 127686.21
## 506  1966 142678.44
## 507  1967 263659.46
## 508  1968 390547.51
## 509  1969 390808.30
## 510  1970 382848.00
## 511  1971 429551.41
## 512  1972 374277.35
## 513  1973 241015.02
## 514  1974 319254.23
## 515  1975 524462.37
## 516  1976 284281.57
## 517  1977 372854.72
## 518  1978 367176.75
## 519  1979 379522.43
## 520  1980 230039.12
## 521  1981 360372.82
## 522  1982 217897.49
## 523  1983 203938.08
## 524  1984 177707.69
## 525  1985 191373.84
## 526  1986 209898.48
## 527  1987 169922.55
## 528  1988 174299.85
## 529  1989 195610.65
## 530  1990 206500.22
## 531  1991 230219.30
## 532  1992 193848.72
## 533  1993 178479.42
## 534  1994 219485.99
## 535  1995 181964.28
## 536  1996 252348.76
## 537  1997 306654.42
## 538  1998 302842.29
## 539  1999 254719.29
## 540  2000 298464.30
## 541  2001 259659.70
## 542  2002 254309.12
## 543  2003 264292.88
## 544  2004 287648.63
## 545  2005 224424.85
## 546  2006 211814.80
## 547  2007 255214.36
## 548  2008 199942.90
## 549  2009 191152.95
## 550  2010 196611.90
## 551  2011 144106.88
## 552  2012 156797.30
## 553  2013 163819.12
## 554  2014 180498.10
## 555  2015 199083.30
## 556  2016 184586.06
## 557  2017 194725.40
## 558  2018 133040.29
## 559  2019 136766.52
## 560  2020 126086.10
## 561  2021 115364.24
## 562  2022 199855.49
## 563  2023 147966.44
## 564  2024 299341.40
## 565  2025 352537.11
## 566  2026 171259.70
## 567  2027 152063.79
## 568  2028 155415.34
## 569  2029 170147.83
## 570  2030 275839.05
## 571  2031 224109.19
## 572  2032 243868.71
## 573  2033 264180.89
## 574  2034 167486.82
## 575  2035 227245.88
## 576  2036 213118.75
## 577  2037 214777.89
## 578  2038 325737.81
## 579  2039 225170.74
## 580  2040 375525.33
## 581  2041 282827.76
## 582  2042 207038.05
## 583  2043 152901.10
## 584  2044 152032.76
## 585  2045 187702.12
## 586  2046 139560.95
## 587  2047 132242.71
## 588  2048 147116.56
## 589  2049 159313.03
## 590  2050 153847.49
## 591  2051 110761.85
## 592  2052 134579.68
## 593  2053 144121.49
## 594  2054  73800.03
## 595  2055 149787.41
## 596  2056 158129.92
## 597  2057 113463.96
## 598  2058 191226.89
## 599  2059 143793.09
## 600  2060 161290.39
## 601  2061 168880.25
## 602  2062 132228.36
## 603  2063 120221.20
## 604  2064 130875.69
## 605  2065 120566.06
## 606  2066 176410.99
## 607  2067 161610.69
## 608  2068 156957.01
## 609  2069 100115.96
## 610  2070  90217.46
## 611  2071  93113.92
## 612  2072 148521.76
## 613  2073 150033.92
## 614  2074 180142.24
## 615  2075 156401.08
## 616  2076 116730.99
## 617  2077 142314.72
## 618  2078 126189.39
## 619  2079 141115.38
## 620  2080 129550.16
## 621  2081 128330.78
## 622  2082 144537.95
## 623  2083 130501.44
## 624  2084 117201.79
## 625  2085 117318.82
## 626  2086 138123.17
## 627  2087 120826.39
## 628  2088  94370.91
## 629  2089  90182.60
## 630  2090 110072.97
## 631  2091 106498.76
## 632  2092 122927.38
## 633  2093 141777.62
## 634  2094 142680.82
## 635  2095 145419.86
## 636  2096  96744.33
## 637  2097  88975.47
## 638  2098 119370.76
## 639  2099  65409.23
## 640  2100  89660.01
## 641  2101 124534.90
## 642  2102 111066.45
## 643  2103 115018.73
## 644  2104 142062.15
## 645  2105 107993.98
## 646  2106  74328.65
## 647  2107 192268.96
## 648  2108 122375.26
## 649  2109 105915.20
## 650  2110 123819.88
## 651  2111 158670.90
## 652  2112 144220.26
## 653  2113 107863.72
## 654  2114 126287.53
## 655  2115 166028.12
## 656  2116 122735.11
## 657  2117 142875.77
## 658  2118 142215.29
## 659  2119 106327.19
## 660  2120 119308.41
## 661  2121  77484.73
## 662  2122  96211.33
## 663  2123 113399.12
## 664  2124 181206.68
## 665  2125 112413.53
## 666  2126 176958.77
## 667  2127 113313.71
## 668  2128 100118.93
## 669  2129 102014.90
## 670  2130 127201.78
## 671  2131 176891.16
## 672  2132 136696.16
## 673  2133 124852.18
## 674  2134 133442.35
## 675  2135 120995.80
## 676  2136  84281.67
## 677  2137 119122.54
## 678  2138 124029.88
## 679  2139 161439.94
## 680  2140 134546.93
## 681  2141 149142.68
## 682  2142 116315.33
## 683  2143 144731.90
## 684  2144  72740.08
## 685  2145 133325.12
## 686  2146 169387.35
## 687  2147 192034.32
## 688  2148 171150.41
## 689  2149 125438.65
## 690  2150 229585.07
## 691  2151 121526.75
## 692  2152 183780.87
## 693  2153 151047.78
## 694  2154 105182.39
## 695  2155 137310.33
## 696  2156 256537.98
## 697  2157 224860.61
## 698  2158 227034.09
## 699  2159 232748.03
## 700  2160 191384.20
## 701  2161 232104.53
## 702  2162 321645.49
## 703  2163 316542.70
## 704  2164 229855.06
## 705  2165 217778.88
## 706  2166 146487.97
## 707  2167 209554.63
## 708  2168 200497.30
## 709  2169 189626.44
## 710  2170 217039.80
## 711  2171 149827.04
## 712  2172 138349.89
## 713  2173 180579.67
## 714  2174 232883.14
## 715  2175 269642.39
## 716  2176 263139.75
## 717  2177 250967.09
## 718  2178 218125.05
## 719  2179 141957.77
## 720  2180 191779.74
## 721  2181 193855.15
## 722  2182 210983.52
## 723  2183 189325.77
## 724  2184 107399.18
## 725  2185 134596.72
## 726  2186 150759.96
## 727  2187 155869.90
## 728  2188 144021.67
## 729  2189 246170.36
## 730  2190 105021.04
## 731  2191  94491.78
## 732  2192  76884.44
## 733  2193 133669.01
## 734  2194 115120.59
## 735  2195  86301.46
## 736  2196  87270.90
## 737  2197 112913.74
## 738  2198 154589.45
## 739  2199 166098.29
## 740  2200 158009.72
## 741  2201 146759.31
## 742  2202 219089.68
## 743  2203 153762.60
## 744  2204 196855.97
## 745  2205 128583.45
## 746  2206 153365.59
## 747  2207 229537.08
## 748  2208 283552.13
## 749  2209 216878.80
## 750  2210 113908.03
## 751  2211 126485.10
## 752  2212 114099.19
## 753  2213  85211.19
## 754  2214 123515.51
## 755  2215  99324.21
## 756  2216 152168.82
## 757  2217  44328.83
## 758  2218  77600.49
## 759  2219  84327.21
## 760  2220  84794.51
## 761  2221 331929.01
## 762  2222 284175.46
## 763  2223 267710.11
## 764  2224 203231.96
## 765  2225 133675.09
## 766  2226 166373.40
## 767  2227 228119.60
## 768  2228 242818.52
## 769  2229 261536.61
## 770  2230 151561.17
## 771  2231 217785.30
## 772  2232 185248.35
## 773  2233 167670.01
## 774  2234 229868.50
## 775  2235 220788.32
## 776  2236 262125.75
## 777  2237 300641.75
## 778  2238 204698.56
## 779  2239 113734.69
## 780  2240 173387.88
## 781  2241 126108.67
## 782  2242 110870.34
## 783  2243 121466.23
## 784  2244  91665.21
## 785  2245 105892.91
## 786  2246 129723.23
## 787  2247 126310.79
## 788  2248 125247.50
## 789  2249 103781.53
## 790  2250 115252.49
## 791  2251 316525.38
## 792  2252 167044.16
## 793  2253 155183.48
## 794  2254 173271.54
## 795  2255 173239.77
## 796  2256 176155.36
## 797  2257 199544.84
## 798  2258 164674.79
## 799  2259 166760.39
## 800  2260  74863.80
## 801  2261 186574.87
## 802  2262 218733.63
## 803  2263 380808.91
## 804  2264 426716.46
## 805  2265 218739.34
## 806  2266 299678.80
## 807  2267 373325.16
## 808  2268 402615.40
## 809  2269 158576.84
## 810  2270 185607.52
## 811  2271 218812.53
## 812  2272 211296.76
## 813  2273 151407.63
## 814  2274 192865.51
## 815  2275 178305.43
## 816  2276 181568.95
## 817  2277 175533.05
## 818  2278 152176.65
## 819  2279 126191.28
## 820  2280 105645.09
## 821  2281 165705.64
## 822  2282 184808.69
## 823  2283 101191.44
## 824  2284 111004.11
## 825  2285 135129.26
## 826  2286 129751.92
## 827  2287 339641.47
## 828  2288 271449.64
## 829  2289 413169.64
## 830  2290 471625.91
## 831  2291 376696.41
## 832  2292 437016.14
## 833  2293 483425.35
## 834  2294 400278.45
## 835  2295 516596.25
## 836  2296 343787.10
## 837  2297 344409.09
## 838  2298 323760.72
## 839  2299 380035.93
## 840  2300 349623.21
## 841  2301 307163.10
## 842  2302 232759.40
## 843  2303 249178.72
## 844  2304 272287.12
## 845  2305 229746.13
## 846  2306 200752.23
## 847  2307 194397.42
## 848  2308 223317.47
## 849  2309 287511.01
## 850  2310 219027.86
## 851  2311 194545.99
## 852  2312 178648.33
## 853  2313 176831.62
## 854  2314 176054.13
## 855  2315 182966.31
## 856  2316 222975.09
## 857  2317 182943.89
## 858  2318 178426.71
## 859  2319 187867.07
## 860  2320 176171.18
## 861  2321 233438.25
## 862  2322 172901.22
## 863  2323 207487.97
## 864  2324 194222.48
## 865  2325 216368.97
## 866  2326 184121.67
## 867  2327 203026.90
## 868  2328 207844.36
## 869  2329 187632.56
## 870  2330 173062.94
## 871  2331 337391.22
## 872  2332 404545.13
## 873  2333 323403.92
## 874  2334 267272.71
## 875  2335 270872.68
## 876  2336 296547.80
## 877  2337 198658.44
## 878  2338 265736.24
## 879  2339 231576.78
## 880  2340 392302.62
## 881  2341 252745.28
## 882  2342 237370.61
## 883  2343 225263.88
## 884  2344 227011.13
## 885  2345 248720.35
## 886  2346 206316.44
## 887  2347 192893.38
## 888  2348 251075.89
## 889  2349 193415.09
## 890  2350 308775.39
## 891  2351 276780.85
## 892  2352 266405.17
## 893  2353 256889.50
## 894  2354 116761.21
## 895  2355 131862.48
## 896  2356 135742.70
## 897  2357 181165.80
## 898  2358 188772.19
## 899  2359 145216.57
## 900  2360 138144.03
## 901  2361 145809.12
## 902  2362 310225.88
## 903  2363 144851.43
## 904  2364 156481.45
## 905  2365 217768.13
## 906  2366 199574.48
## 907  2367 263407.61
## 908  2368 224659.99
## 909  2369 255106.23
## 910  2370 173797.26
## 911  2371 166349.30
## 912  2372 183751.86
## 913  2373 270856.93
## 914  2374 286263.92
## 915  2375 244792.83
## 916  2376 315821.23
## 917  2377 368730.51
## 918  2378 155237.36
## 919  2379 201077.79
## 920  2380 135855.58
## 921  2381 161419.37
## 922  2382 200381.77
## 923  2383 211165.41
## 924  2384 227514.56
## 925  2385 161102.16
## 926  2386 134962.36
## 927  2387 139046.17
## 928  2388 130610.04
## 929  2389 123580.00
## 930  2390 147607.78
## 931  2391 128304.92
## 932  2392 114208.66
## 933  2393 180743.72
## 934  2394 149429.41
## 935  2395 169127.25
## 936  2396 154386.12
## 937  2397 204141.84
## 938  2398 134176.38
## 939  2399  48027.95
## 940  2400  54591.56
## 941  2401  99884.41
## 942  2402 128097.73
## 943  2403 155350.06
## 944  2404 148726.79
## 945  2405 158893.01
## 946  2406 145125.76
## 947  2407 127168.31
## 948  2408 136639.41
## 949  2409 124295.95
## 950  2410 173061.29
## 951  2411 125381.35
## 952  2412 135317.51
## 953  2413 132872.16
## 954  2414 148965.41
## 955  2415 145026.15
## 956  2416 131855.99
## 957  2417 137135.20
## 958  2418 135782.68
## 959  2419 118203.52
## 960  2420 139117.57
## 961  2421 147589.58
## 962  2422 122567.55
## 963  2423 119202.87
## 964  2424 151561.39
## 965  2425 175020.67
## 966  2426 124614.63
## 967  2427 117332.29
## 968  2428 182447.99
## 969  2429 124514.21
## 970  2430 143920.75
## 971  2431 128417.68
## 972  2432 138843.07
## 973  2433 132764.50
## 974  2434 135638.92
## 975  2435 147144.55
## 976  2436 113447.03
## 977  2437 109174.12
## 978  2438 126992.73
## 979  2439 113109.84
## 980  2440 109810.93
## 981  2441 111985.17
## 982  2442 104062.67
## 983  2443 119614.85
## 984  2444 128763.01
## 985  2445  73497.21
## 986  2446 113375.45
## 987  2447 189362.02
## 988  2448 123683.73
## 989  2449  86552.18
## 990  2450 142561.85
## 991  2451 125930.98
## 992  2452 194112.26
## 993  2453  91132.98
## 994  2454 144334.57
## 995  2455 144260.56
## 996  2456 125580.00
## 997  2457 117618.70
## 998  2458 121748.40
## 999  2459  90224.90
## 1000 2460 150652.58
## 1001 2461 102797.45
## 1002 2462 124645.59
## 1003 2463 135098.70
## 1004 2464 149037.65
## 1005 2465 131280.87
## 1006 2466  92113.28
## 1007 2467 157112.95
## 1008 2468 108066.16
## 1009 2469 113815.24
## 1010 2470 236795.23
## 1011 2471 212288.10
## 1012 2472 193209.77
## 1013 2473 111547.14
## 1014 2474 100680.41
## 1015 2475 223567.75
## 1016 2476 125810.75
## 1017 2477 122815.79
## 1018 2478 161903.26
## 1019 2479 117095.31
## 1020 2480 159864.47
## 1021 2481 127249.09
## 1022 2482 146010.64
## 1023 2483 112123.05
## 1024 2484 142164.67
## 1025 2485 122214.34
## 1026 2486 153430.54
## 1027 2487 224465.09
## 1028 2488 186015.44
## 1029 2489 161518.90
## 1030 2490 150879.90
## 1031 2491 104207.80
## 1032 2492 192836.21
## 1033 2493 181267.29
## 1034 2494 184748.54
## 1035 2495 123936.68
## 1036 2496 278095.20
## 1037 2497 144848.08
## 1038 2498 110894.41
## 1039 2499  99426.86
## 1040 2500 108630.75
## 1041 2501 130554.94
## 1042 2502 150034.02
## 1043 2503 105060.80
## 1044 2504 222643.92
## 1045 2505 226745.32
## 1046 2506 249773.32
## 1047 2507 305574.89
## 1048 2508 248468.36
## 1049 2509 210154.46
## 1050 2510 216196.26
## 1051 2511 178119.44
## 1052 2512 198952.11
## 1053 2513 215226.20
## 1054 2514 288031.20
## 1055 2515 147755.67
## 1056 2516 182383.18
## 1057 2517 138026.12
## 1058 2518 156093.82
## 1059 2519 210608.68
## 1060 2520 205682.79
## 1061 2521 193176.56
## 1062 2522 221185.01
## 1063 2523 127447.87
## 1064 2524 144288.45
## 1065 2525 146668.82
## 1066 2526 135476.17
## 1067 2527 139325.31
## 1068 2528 125094.26
## 1069 2529 142602.48
## 1070 2530 112623.04
## 1071 2531 230012.50
## 1072 2532 226188.08
## 1073 2533 193637.47
## 1074 2534 222631.72
## 1075 2535 296988.85
## 1076 2536 247155.80
## 1077 2537 216360.70
## 1078 2538 196616.27
## 1079 2539 188943.90
## 1080 2540 185874.05
## 1081 2541 191056.35
## 1082 2542 160983.41
## 1083 2543 113451.65
## 1084 2544 101409.51
## 1085 2545 154556.14
## 1086 2546 130967.02
## 1087 2547 139961.60
## 1088 2548 124967.56
## 1089 2549 151132.75
## 1090 2550 191364.20
## 1091 2551 125420.05
## 1092 2552 118882.11
## 1093 2553  94594.39
## 1094 2554 113116.22
## 1095 2555 140363.75
## 1096 2556  78454.99
## 1097 2557  95201.45
## 1098 2558 186334.60
## 1099 2559 139049.39
## 1100 2560 177384.55
## 1101 2561 171751.29
## 1102 2562 146187.14
## 1103 2563 154296.85
## 1104 2564 199360.09
## 1105 2565 155661.20
## 1106 2566 173791.13
## 1107 2567 142267.71
## 1108 2568 199133.84
## 1109 2569 202966.45
## 1110 2570 113971.95
## 1111 2571 176173.64
## 1112 2572 176248.41
## 1113 2573 223717.52
## 1114 2574 376371.16
## 1115 2575 114612.51
## 1116 2576 132339.89
## 1117 2577 196775.30
## 1118 2578  72798.56
## 1119 2579  55827.31
## 1120 2580 153270.30
## 1121 2581 105254.16
## 1122 2582 100753.95
## 1123 2583 309204.52
## 1124 2584 180898.90
## 1125 2585 165404.49
## 1126 2586 221932.37
## 1127 2587 194621.83
## 1128 2588 142978.87
## 1129 2589 153090.44
## 1130 2590 234404.26
## 1131 2591 273502.35
## 1132 2592 241759.19
## 1133 2593 277046.09
## 1134 2594 179525.21
## 1135 2595 205494.16
## 1136 2596 300494.68
## 1137 2597 184568.76
## 1138 2598 286851.50
## 1139 2599 323624.95
## 1140 2600 204015.44
## 1141 2601 183985.30
## 1142 2602  87465.57
## 1143 2603  86811.70
## 1144 2604  79726.96
## 1145 2605  89640.29
## 1146 2606 151597.16
## 1147 2607 193161.19
## 1148 2608 206169.04
## 1149 2609 141684.13
## 1150 2610 110862.67
## 1151 2611  89991.27
## 1152 2612 149083.31
## 1153 2613 131909.34
## 1154 2614 117076.35
## 1155 2615 162325.78
## 1156 2616 150483.40
## 1157 2617 158684.27
## 1158 2618 153934.53
## 1159 2619 185722.30
## 1160 2620 177714.07
## 1161 2621 174501.46
## 1162 2622 173365.30
## 1163 2623 239153.81
## 1164 2624 303241.06
## 1165 2625 344488.03
## 1166 2626 163414.62
## 1167 2627 172886.95
## 1168 2628 473661.44
## 1169 2629 508471.19
## 1170 2630 363667.65
## 1171 2631 462567.92
## 1172 2632 446028.71
## 1173 2633 298336.26
## 1174 2634 390961.65
## 1175 2635 161206.57
## 1176 2636 175069.37
## 1177 2637 171711.13
## 1178 2638 301015.80
## 1179 2639 200262.13
## 1180 2640 142865.09
## 1181 2641 119691.66
## 1182 2642 180979.90
## 1183 2643 109996.73
## 1184 2644 115474.53
## 1185 2645  98971.83
## 1186 2646 104049.48
## 1187 2647  99398.76
## 1188 2648 150121.91
## 1189 2649 144795.17
## 1190 2650 148497.31
## 1191 2651 139654.98
## 1192 2652 434212.18
## 1193 2653 308090.53
## 1194 2654 221874.61
## 1195 2655 380177.31
## 1196 2656 339933.02
## 1197 2657 358648.65
## 1198 2658 357495.78
## 1199 2659 313548.63
## 1200 2660 363609.49
## 1201 2661 361651.83
## 1202 2662 367239.29
## 1203 2663 300562.29
## 1204 2664 274134.44
## 1205 2665 376549.86
## 1206 2666 305161.45
## 1207 2667 179390.79
## 1208 2668 189288.13
## 1209 2669 167665.77
## 1210 2670 294854.17
## 1211 2671 189788.06
## 1212 2672 221122.96
## 1213 2673 219255.94
## 1214 2674 221792.60
## 1215 2675 167453.13
## 1216 2676 192363.02
## 1217 2677 181068.14
## 1218 2678 280789.56
## 1219 2679 259428.00
## 1220 2680 284695.98
## 1221 2681 400187.14
## 1222 2682 321360.52
## 1223 2683 546154.15
## 1224 2684 307936.70
## 1225 2685 362054.53
## 1226 2686 279357.72
## 1227 2687 304404.60
## 1228 2688 232298.52
## 1229 2689 208893.37
## 1230 2690 420532.81
## 1231 2691 196379.42
## 1232 2692 118991.02
## 1233 2693 186266.59
## 1234 2694 123009.80
## 1235 2695 184866.24
## 1236 2696 177692.75
## 1237 2697 166608.38
## 1238 2698 181568.67
## 1239 2699 189993.59
## 1240 2700 159474.44
## 1241 2701 148300.60
## 1242 2702 134060.05
## 1243 2703 165527.21
## 1244 2704 152378.50
## 1245 2705 113375.40
## 1246 2706 112669.89
## 1247 2707 140347.85
## 1248 2708 118087.60
## 1249 2709 104923.79
## 1250 2710 119074.61
## 1251 2711 421413.91
## 1252 2712 372008.03
## 1253 2713 160488.00
## 1254 2714 149539.68
## 1255 2715 164919.61
## 1256 2716 142478.09
## 1257 2717 205657.57
## 1258 2718 227343.63
## 1259 2719 162146.45
## 1260 2720 178245.57
## 1261 2721 140521.25
## 1262 2722 142639.98
## 1263 2723 153706.23
## 1264 2724 126057.46
## 1265 2725 132946.94
## 1266 2726 133743.76
## 1267 2727 182711.26
## 1268 2728 173411.05
## 1269 2729 138116.35
## 1270 2730 135352.58
## 1271 2731 140226.56
## 1272 2732 117335.69
## 1273 2733 158527.75
## 1274 2734 159959.78
## 1275 2735 131431.79
## 1276 2736 124129.94
## 1277 2737 116445.79
## 1278 2738 148558.19
## 1279 2739 171937.67
## 1280 2740 134545.69
## 1281 2741 133390.34
## 1282 2742 154581.42
## 1283 2743 138789.11
## 1284 2744 160945.04
## 1285 2745 150099.07
## 1286 2746 141301.61
## 1287 2747 163098.09
## 1288 2748 120254.42
## 1289 2749 119499.75
## 1290 2750 140372.76
## 1291 2751 138684.78
## 1292 2752 190797.92
## 1293 2753 154404.54
## 1294 2754 227178.16
## 1295 2755 138987.75
## 1296 2756  84619.99
## 1297 2757  88657.96
## 1298 2758  99204.53
## 1299 2759 123440.93
## 1300 2760  96107.60
## 1301 2761 149256.29
## 1302 2762 146238.43
## 1303 2763 196222.05
## 1304 2764 179424.30
## 1305 2765 218182.00
## 1306 2766 114391.03
## 1307 2767 101687.33
## 1308 2768 131479.39
## 1309 2769 116793.48
## 1310 2770 163276.37
## 1311 2771 122996.01
## 1312 2772 113927.23
## 1313 2773 133778.65
## 1314 2774 123531.09
## 1315 2775  90919.66
## 1316 2776 151048.08
## 1317 2777 138276.06
## 1318 2778 112813.76
## 1319 2779 103892.16
## 1320 2780 107595.24
## 1321 2781  93147.21
## 1322 2782  84488.48
## 1323 2783  62875.28
## 1324 2784 110315.95
## 1325 2785  98246.10
## 1326 2786  94399.19
## 1327 2787 118458.94
## 1328 2788  67103.89
## 1329 2789 134602.18
## 1330 2790  88029.21
## 1331 2791 107543.90
## 1332 2792  42707.66
## 1333 2793 172344.90
## 1334 2794  76274.60
## 1335 2795 109666.72
## 1336 2796 105131.46
## 1337 2797 220987.59
## 1338 2798 105605.48
## 1339 2799 109692.97
## 1340 2800  69660.18
## 1341 2801  94966.48
## 1342 2802 139678.90
## 1343 2803 184275.83
## 1344 2804 141937.66
## 1345 2805 106978.29
## 1346 2806  98929.85
## 1347 2807 168462.70
## 1348 2808 138085.81
## 1349 2809 145069.49
## 1350 2810 127159.59
## 1351 2811 167995.70
## 1352 2812 159090.74
## 1353 2813 164226.12
## 1354 2814 164217.41
## 1355 2815 111961.08
## 1356 2816 243904.26
## 1357 2817 142124.03
## 1358 2818 138163.26
## 1359 2819 224775.26
## 1360 2820 125178.78
## 1361 2821 104422.34
## 1362 2822 185131.18
## 1363 2823 113052.01
## 1364 2824 163506.67
## 1365 2825 155103.05
## 1366 2826 129870.08
## 1367 2827 133593.42
## 1368 2828 237218.58
## 1369 2829 217330.88
## 1370 2830 239582.83
## 1371 2831 165305.85
## 1372 2832 246061.76
## 1373 2833 273179.94
## 1374 2834 219205.36
## 1375 2835 211128.28
## 1376 2836 189613.35
## 1377 2837 178579.45
## 1378 2838 145989.76
## 1379 2839 181007.09
## 1380 2840 197951.81
## 1381 2841 194740.51
## 1382 2842 222886.51
## 1383 2843 137984.55
## 1384 2844 177279.69
## 1385 2845 114454.09
## 1386 2846 197247.64
## 1387 2847 189075.30
## 1388 2848 211980.27
## 1389 2849 211631.11
## 1390 2850 265734.12
## 1391 2851 242035.16
## 1392 2852 233096.58
## 1393 2853 238875.70
## 1394 2854 141704.04
## 1395 2855 203207.70
## 1396 2856 214568.93
## 1397 2857 189044.08
## 1398 2858 206706.14
## 1399 2859 134698.41
## 1400 2860 125604.14
## 1401 2861 129017.53
## 1402 2862 174989.31
## 1403 2863 123009.36
## 1404 2864 176852.11
## 1405 2865 142133.62
## 1406 2866 152410.83
## 1407 2867  74978.46
## 1408 2868 144412.26
## 1409 2869 114413.28
## 1410 2870 145467.54
## 1411 2871  86735.08
## 1412 2872  24369.74
## 1413 2873 119135.58
## 1414 2874 127476.65
## 1415 2875 125180.96
## 1416 2876 168402.49
## 1417 2877 111988.15
## 1418 2878 159713.61
## 1419 2879 124632.88
## 1420 2880 103310.37
## 1421 2881 162341.88
## 1422 2882 175646.30
## 1423 2883 187242.10
## 1424 2884 217138.04
## 1425 2885 184504.50
## 1426 2886 216127.48
## 1427 2887 108715.38
## 1428 2888 128898.57
## 1429 2889  60086.12
## 1430 2890  61963.19
## 1431 2891 154093.51
## 1432 2892  52289.91
## 1433 2893 109080.88
## 1434 2894  53242.60
## 1435 2895 350229.09
## 1436 2896 281697.37
## 1437 2897 189556.81
## 1438 2898 154743.02
## 1439 2899 197668.84
## 1440 2900 159906.99
## 1441 2901  39136.60
## 1442 2902 203538.20
## 1443 2903 315701.33
## 1444 2904 328143.85
## 1445 2905  92179.79
## 1446 2906 211194.30
## 1447 2907 115605.22
## 1448 2908 125426.56
## 1449 2909 147882.54
## 1450 2910  77671.09
## 1451 2911  87407.27
## 1452 2912 143439.28
## 1453 2913  92544.49
## 1454 2914  79817.32
## 1455 2915  81012.39
## 1456 2916  93144.96
## 1457 2917 126589.80
## 1458 2918 111054.42
## 1459 2919 195262.98
#write_csv(bw_submission, "../kaggleData/backwardsSelectionPredictions.csv")

nrow(bw_submission)
## [1] 1459
sum(is.na(bw_submission))
## [1] 0
bw_submission_na <- bw_submission %>% filter_all(any_vars(is.na(.))) 
bw_submission_na
## [1] Id        SalePrice
## <0 rows> (or 0-length row.names)
bw_vif = VIF(bw_model)
c(bw_vif)
##                          GrLivArea               Neighborhood_Blmngtn 
##                         169.711817                         501.085419 
##               Neighborhood_ClearCr               Neighborhood_Crawfor 
##                           2.452681                           1.660267 
##               Neighborhood_Edwards               Neighborhood_Gilbert 
##                           1.954815                           1.682847 
##                Neighborhood_IDOTRR               Neighborhood_Mitchel 
##                           1.595351                           1.707223 
##                 Neighborhood_NAmes               Neighborhood_NridgHt 
##                           2.404914                           8.528848 
##                Neighborhood_NWAmes               Neighborhood_OldTown 
##                           1.742246                           1.724497 
##               Neighborhood_SawyerW               Neighborhood_StoneBr 
##                           1.262879                           2.498052 
##                 Neighborhood_SWISU                            LotArea 
##                           3.618518                         308.799025 
##              SaleCondition_Abnorml               SaleCondition_Alloca 
##                           2.507058                           1.536858 
##               SaleCondition_Family               SaleCondition_Normal 
##                           1.644526                           3.194496 
##                  HouseStyle_1.5Unf                  HouseStyle_SFoyer 
##                           1.706572                           2.010274 
##                     KitchenQual_Ex                     KitchenQual_Gd 
##                           2.953246                           2.408595 
##                       YearRemodAdd                         GarageCars 
##                           2.367545                           2.301345 
##                           PoolArea                         Fireplaces 
##                           1.552491                           1.750519 
##                       BsmtFullBath                       BsmtHalfBath 
##                           1.438649                           1.188072 
##                           FullBath                           HalfBath 
##                           3.161928                           2.423830 
##                       BedroomAbvGr                        OverallQual 
##                          23.110253                           3.619592 
##                         GrLivArea2                          X1stFlrSF 
##                         211.359262                           4.470811 
##     GrLivArea:Neighborhood_ClearCr     GrLivArea:Neighborhood_CollgCr 
##                          71.299884                           2.449388 
##     GrLivArea:Neighborhood_Crawfor     GrLivArea:Neighborhood_Edwards 
##                          38.007782                          27.690761 
##     GrLivArea:Neighborhood_Gilbert     GrLivArea:Neighborhood_MeadowV 
##                           1.429718                          39.373727 
##     GrLivArea:Neighborhood_Mitchel     GrLivArea:Neighborhood_NridgHt 
##                           1.775368                         180.216182 
##     GrLivArea:Neighborhood_OldTown      GrLivArea:Neighborhood_Sawyer 
##                           3.841193                           2.021334 
##     GrLivArea:Neighborhood_SawyerW     GrLivArea:Neighborhood_Somerst 
##                          27.531391                          25.122317 
##     GrLivArea:Neighborhood_StoneBr      GrLivArea:Neighborhood_Timber 
##                          81.939461                          36.904369 
##    GrLivArea:SaleCondition_Abnorml     GrLivArea:SaleCondition_Alloca 
##                           5.456025                         100.997023 
##     GrLivArea:SaleCondition_Normal        GrLivArea:HouseStyle_1.5Fin 
##                          26.086649                          40.491096 
##        GrLivArea:HouseStyle_1Story        GrLivArea:HouseStyle_2.5Unf 
##                          73.951846                           1.721706 
##           GrLivArea:KitchenQual_Ex           GrLivArea:KitchenQual_Gd 
##                           7.157464                           3.542083 
##    Neighborhood_Blmngtn:GrLivArea2    Neighborhood_ClearCr:GrLivArea2 
##                           3.696635                          61.264217 
##    Neighborhood_Crawfor:GrLivArea2    Neighborhood_Edwards:GrLivArea2 
##                          39.291865                          37.327981 
##    GrLivArea2:Neighborhood_MeadowV      Neighborhood_NAmes:GrLivArea2 
##                          35.467183                           4.177225 
##    Neighborhood_NridgHt:GrLivArea2     Neighborhood_NWAmes:GrLivArea2 
##                         136.065588                           1.494795 
##    Neighborhood_SawyerW:GrLivArea2    GrLivArea2:Neighborhood_Somerst 
##                          27.592667                          26.196554 
##    Neighborhood_StoneBr:GrLivArea2      Neighborhood_SWISU:GrLivArea2 
##                          74.530029                           5.945934 
##     GrLivArea2:Neighborhood_Timber    SaleCondition_Alloca:GrLivArea2 
##                          36.123896                          94.526492 
##    SaleCondition_Family:GrLivArea2       GrLivArea2:HouseStyle_1.5Fin 
##                           1.439987                          49.517341 
##       HouseStyle_1.5Unf:GrLivArea2       GrLivArea2:HouseStyle_1Story 
##                           7.635311                          69.723115 
##       GrLivArea2:HouseStyle_2Story       Neighborhood_Blmngtn:LotArea 
##                          43.157961                         470.772860 
##       Neighborhood_ClearCr:LotArea       LotArea:Neighborhood_CollgCr 
##                          12.553615                           1.889958 
##       Neighborhood_Crawfor:LotArea       Neighborhood_Gilbert:LotArea 
##                           1.925866                           1.332266 
##       Neighborhood_Mitchel:LotArea         Neighborhood_NAmes:LotArea 
##                           1.566226                           1.978038 
##       Neighborhood_NridgHt:LotArea        Neighborhood_NWAmes:LotArea 
##                           2.277506                           1.404868 
##        LotArea:Neighborhood_Sawyer         Neighborhood_SWISU:LotArea 
##                           1.495581                           3.448081 
##        LotArea:Neighborhood_Timber       LotArea:Neighborhood_Veenker 
##                          18.572092                           1.512909 
##      LotArea:SaleCondition_Abnorml       LotArea:SaleCondition_Alloca 
##                           3.488133                           3.032124 
##       LotArea:SaleCondition_Family       LotArea:SaleCondition_Normal 
##                           1.313751                         122.499905 
##          LotArea:HouseStyle_1.5Fin          LotArea:HouseStyle_1Story 
##                          60.213260                          91.379592 
##          LotArea:HouseStyle_2Story  Neighborhood_Blmngtn:BedroomAbvGr 
##                          23.733360                          10.815486 
##  Neighborhood_ClearCr:BedroomAbvGr  BedroomAbvGr:Neighborhood_CollgCr 
##                           1.985115                           2.522057 
##  Neighborhood_Edwards:BedroomAbvGr   Neighborhood_IDOTRR:BedroomAbvGr 
##                           2.207872                           1.562117 
##    Neighborhood_NAmes:BedroomAbvGr  Neighborhood_NridgHt:BedroomAbvGr 
##                           2.675244                           2.511836 
##  Neighborhood_OldTown:BedroomAbvGr   BedroomAbvGr:Neighborhood_Sawyer 
##                           2.725649                           1.541303 
##  Neighborhood_SawyerW:BedroomAbvGr  BedroomAbvGr:Neighborhood_Somerst 
##                           2.551368                           1.881083 
##    Neighborhood_SWISU:BedroomAbvGr SaleCondition_Abnorml:BedroomAbvGr 
##                           4.703909                           3.552472 
##  SaleCondition_Normal:BedroomAbvGr     HouseStyle_1.5Unf:BedroomAbvGr 
##                          14.593908                           4.705889 
##     BedroomAbvGr:HouseStyle_2Story 
##                           3.158440
# outliers list
outliers_forward = c(4, 54,   59,   66,   67,   70,   94,  119,  121,  138,  152,  154,  164,  179,  186,  209,  219,  239,  250,  252,  262,  305,  314,  321,  322,  331,  336,  337,  349,  350,  363,  384,  385,  401,  427,  439,  441,  474,  478,  497,  524,  528,  530,  560,  567,  569,  582,  584,
 586,  589,  592,  598,  608,  622,  633,  636,  641,  643,  656,  662,  665,  682,  686,  689,  692,  703,  713,  725,  745,  770,  775,  779,  799,  804,  811,  813,  823,  826,  841,  876,  878,  886,  898,  899,  926,  940,  962,  971, 1018, 1025, 1032, 1045, 1047, 1049, 1063, 1066,
 1069, 1128, 1143, 1156, 1169, 1170, 1174, 1176, 1182, 1183, 1217, 1268, 1269, 1285, 1299, 1311, 1323, 1325, 1327, 1329, 1360, 1387, 1389, 1397, 1416, 1424, 1441)
#outliers_forward = c(1047,770,1047,1424)

custom_train_data = data_train[!(data_train$Id %in% outliers_forward), ]




selected_features_q2 = c("GrLivArea", "Neighborhood", "LotArea", "YrSold", "SaleCondition", "HouseStyle", "KitchenQual", "YearRemodAdd","GarageCars", "Fireplaces","BsmtFullBath","BsmtHalfBath","FullBath","HalfBath","BedroomAbvGr","Remodel","OverallQual", "GrLivArea2","X1stFlrSF","X2ndFlrSF","PoolArea")



custom_train_data = custom_train_data %>% select(Id, selected_features_q2,  SalePrice)





# 2.5Fin does not exist in test data so changing it to 1.5Unf
custom_train_data$HouseStyle = as.character(custom_train_data$HouseStyle)
custom_train_data = custom_train_data %>%   mutate_at(vars(HouseStyle) ,     ~ifelse(.x=="2.5Fin","1.5Unf",.x  ))

custom_train_data$HouseStyle = as.factor(custom_train_data$HouseStyle)

custom_train_data_process = preProcess(custom_train_data[,2:22], method=c("center", "scale"))
custom_train_data =  predict(custom_train_data_process, custom_train_data)

custom_test_data = data_test %>%  select(Id, selected_features_q2)
custom_test_data =  predict(custom_train_data_process, custom_test_data)





custom_test_data$KitchenQual = as.character(custom_test_data$KitchenQual)
custom_test_data = custom_test_data %>%   mutate_at(vars(KitchenQual) ,     ~ifelse(is.na(.x),"Ex",.x  ))
custom_test_data$KitchenQual = as.factor(custom_test_data$KitchenQual)

# Inpute = NA in test data
custom_test_data= custom_test_data %>% mutate_at(vars(GarageCars),~ifelse(is.na(.x), median(.x, na.rm = TRUE), .x))
custom_test_data= custom_test_data %>% mutate_at(vars(BsmtFullBath),~ifelse(is.na(.x), median(.x, na.rm = TRUE), .x))
custom_test_data= custom_test_data %>% mutate_at(vars(BsmtHalfBath),~ifelse(is.na(.x), median(.x, na.rm = TRUE), .x))




one_encode_custom_train_data=  one_hot(as.data.table(custom_train_data, dropUnusedLevels=TRUE))

one_encode_custom_test_data =  one_hot(as.data.table(custom_test_data, dropUnusedLevels=TRUE))








#Refferences: Neighborhood_BrkSide KitchenQual_TA HouseStyle_SLvl SaleCondition_Partial


lm_fit_custom = lm(SalePrice ~.-SaleCondition_Partial-Id-HouseStyle_SLvl-Neighborhood_BrkSide-KitchenQual_TA+
                 
                 (Neighborhood_Blmngtn+Neighborhood_Blueste+Neighborhood_BrDale+Neighborhood_ClearCr+Neighborhood_CollgCr+Neighborhood_Crawfor+Neighborhood_Edwards+Neighborhood_Gilbert+Neighborhood_IDOTRR+Neighborhood_MeadowV+Neighborhood_Mitchel+Neighborhood_NAmes+Neighborhood_NPkVill+Neighborhood_NridgHt+Neighborhood_NWAmes+Neighborhood_OldTown+Neighborhood_Sawyer+Neighborhood_SawyerW+Neighborhood_Somerst+Neighborhood_StoneBr+Neighborhood_SWISU+Neighborhood_Timber+Neighborhood_Veenker+SaleCondition_Abnorml+SaleCondition_AdjLand+SaleCondition_Alloca+SaleCondition_Family+SaleCondition_Normal+HouseStyle_1.5Fin+HouseStyle_1.5Unf+HouseStyle_1Story+HouseStyle_2.5Unf+HouseStyle_2Story+HouseStyle_SFoyer+KitchenQual_Ex+KitchenQual_Fa+KitchenQual_Gd )*GrLivArea +
                 
                 (Neighborhood_Blmngtn+Neighborhood_BrDale+Neighborhood_ClearCr+Neighborhood_CollgCr+Neighborhood_Crawfor+Neighborhood_Edwards+Neighborhood_Gilbert+Neighborhood_IDOTRR+Neighborhood_MeadowV+Neighborhood_Mitchel+Neighborhood_NAmes+Neighborhood_NPkVill+Neighborhood_NridgHt+Neighborhood_NWAmes+Neighborhood_OldTown+Neighborhood_Sawyer+Neighborhood_SawyerW+Neighborhood_Somerst+Neighborhood_StoneBr+Neighborhood_SWISU+Neighborhood_Timber+Neighborhood_Veenker+SaleCondition_Abnorml+SaleCondition_AdjLand+SaleCondition_Alloca+SaleCondition_Family+SaleCondition_Normal+HouseStyle_1.5Fin+HouseStyle_1.5Unf+HouseStyle_1Story+HouseStyle_2.5Unf+HouseStyle_2Story+HouseStyle_SFoyer+KitchenQual_Ex+KitchenQual_Fa+KitchenQual_Gd)*GrLivArea2 +
                 
                 (Neighborhood_Blmngtn+Neighborhood_BrDale+Neighborhood_ClearCr+Neighborhood_CollgCr+Neighborhood_Crawfor+Neighborhood_Edwards+Neighborhood_Gilbert+Neighborhood_IDOTRR+Neighborhood_MeadowV+Neighborhood_Mitchel+Neighborhood_NAmes+Neighborhood_NPkVill+Neighborhood_NridgHt+Neighborhood_NWAmes+Neighborhood_OldTown+Neighborhood_Sawyer+Neighborhood_SawyerW+Neighborhood_Somerst+Neighborhood_StoneBr+Neighborhood_SWISU+Neighborhood_Timber+Neighborhood_Veenker+SaleCondition_Abnorml+SaleCondition_AdjLand+SaleCondition_Alloca+SaleCondition_Family+SaleCondition_Normal+HouseStyle_1.5Fin+HouseStyle_1.5Unf+HouseStyle_1Story+HouseStyle_2.5Unf+HouseStyle_2Story+HouseStyle_SFoyer)*LotArea + 
                
                 (Neighborhood_Blmngtn+Neighborhood_BrDale+Neighborhood_ClearCr+Neighborhood_CollgCr+Neighborhood_Crawfor+Neighborhood_Edwards+Neighborhood_Gilbert+Neighborhood_IDOTRR+Neighborhood_MeadowV+Neighborhood_Mitchel+Neighborhood_NAmes+Neighborhood_NPkVill+Neighborhood_NridgHt+Neighborhood_NWAmes+Neighborhood_OldTown+Neighborhood_Sawyer+Neighborhood_SawyerW+Neighborhood_Somerst+Neighborhood_StoneBr+Neighborhood_SWISU+Neighborhood_Timber+Neighborhood_Veenker+SaleCondition_Abnorml+SaleCondition_Alloca+SaleCondition_Family+SaleCondition_Normal+HouseStyle_1.5Fin+HouseStyle_1.5Unf+HouseStyle_1Story+HouseStyle_2.5Unf+HouseStyle_2Story+HouseStyle_SFoyer+KitchenQual_Ex+KitchenQual_Fa+KitchenQual_Gd ) * BedroomAbvGr
               
               
               , data = one_encode_custom_train_data)



summary(lm_fit_custom)
## 
## Call:
## lm(formula = SalePrice ~ . - SaleCondition_Partial - Id - HouseStyle_SLvl - 
##     Neighborhood_BrkSide - KitchenQual_TA + (Neighborhood_Blmngtn + 
##     Neighborhood_Blueste + Neighborhood_BrDale + Neighborhood_ClearCr + 
##     Neighborhood_CollgCr + Neighborhood_Crawfor + Neighborhood_Edwards + 
##     Neighborhood_Gilbert + Neighborhood_IDOTRR + Neighborhood_MeadowV + 
##     Neighborhood_Mitchel + Neighborhood_NAmes + Neighborhood_NPkVill + 
##     Neighborhood_NridgHt + Neighborhood_NWAmes + Neighborhood_OldTown + 
##     Neighborhood_Sawyer + Neighborhood_SawyerW + Neighborhood_Somerst + 
##     Neighborhood_StoneBr + Neighborhood_SWISU + Neighborhood_Timber + 
##     Neighborhood_Veenker + SaleCondition_Abnorml + SaleCondition_AdjLand + 
##     SaleCondition_Alloca + SaleCondition_Family + SaleCondition_Normal + 
##     HouseStyle_1.5Fin + HouseStyle_1.5Unf + HouseStyle_1Story + 
##     HouseStyle_2.5Unf + HouseStyle_2Story + HouseStyle_SFoyer + 
##     KitchenQual_Ex + KitchenQual_Fa + KitchenQual_Gd) * GrLivArea + 
##     (Neighborhood_Blmngtn + Neighborhood_BrDale + Neighborhood_ClearCr + 
##         Neighborhood_CollgCr + Neighborhood_Crawfor + Neighborhood_Edwards + 
##         Neighborhood_Gilbert + Neighborhood_IDOTRR + Neighborhood_MeadowV + 
##         Neighborhood_Mitchel + Neighborhood_NAmes + Neighborhood_NPkVill + 
##         Neighborhood_NridgHt + Neighborhood_NWAmes + Neighborhood_OldTown + 
##         Neighborhood_Sawyer + Neighborhood_SawyerW + Neighborhood_Somerst + 
##         Neighborhood_StoneBr + Neighborhood_SWISU + Neighborhood_Timber + 
##         Neighborhood_Veenker + SaleCondition_Abnorml + SaleCondition_AdjLand + 
##         SaleCondition_Alloca + SaleCondition_Family + SaleCondition_Normal + 
##         HouseStyle_1.5Fin + HouseStyle_1.5Unf + HouseStyle_1Story + 
##         HouseStyle_2.5Unf + HouseStyle_2Story + HouseStyle_SFoyer + 
##         KitchenQual_Ex + KitchenQual_Fa + KitchenQual_Gd) * GrLivArea2 + 
##     (Neighborhood_Blmngtn + Neighborhood_BrDale + Neighborhood_ClearCr + 
##         Neighborhood_CollgCr + Neighborhood_Crawfor + Neighborhood_Edwards + 
##         Neighborhood_Gilbert + Neighborhood_IDOTRR + Neighborhood_MeadowV + 
##         Neighborhood_Mitchel + Neighborhood_NAmes + Neighborhood_NPkVill + 
##         Neighborhood_NridgHt + Neighborhood_NWAmes + Neighborhood_OldTown + 
##         Neighborhood_Sawyer + Neighborhood_SawyerW + Neighborhood_Somerst + 
##         Neighborhood_StoneBr + Neighborhood_SWISU + Neighborhood_Timber + 
##         Neighborhood_Veenker + SaleCondition_Abnorml + SaleCondition_AdjLand + 
##         SaleCondition_Alloca + SaleCondition_Family + SaleCondition_Normal + 
##         HouseStyle_1.5Fin + HouseStyle_1.5Unf + HouseStyle_1Story + 
##         HouseStyle_2.5Unf + HouseStyle_2Story + HouseStyle_SFoyer) * 
##         LotArea + (Neighborhood_Blmngtn + Neighborhood_BrDale + 
##     Neighborhood_ClearCr + Neighborhood_CollgCr + Neighborhood_Crawfor + 
##     Neighborhood_Edwards + Neighborhood_Gilbert + Neighborhood_IDOTRR + 
##     Neighborhood_MeadowV + Neighborhood_Mitchel + Neighborhood_NAmes + 
##     Neighborhood_NPkVill + Neighborhood_NridgHt + Neighborhood_NWAmes + 
##     Neighborhood_OldTown + Neighborhood_Sawyer + Neighborhood_SawyerW + 
##     Neighborhood_Somerst + Neighborhood_StoneBr + Neighborhood_SWISU + 
##     Neighborhood_Timber + Neighborhood_Veenker + SaleCondition_Abnorml + 
##     SaleCondition_Alloca + SaleCondition_Family + SaleCondition_Normal + 
##     HouseStyle_1.5Fin + HouseStyle_1.5Unf + HouseStyle_1Story + 
##     HouseStyle_2.5Unf + HouseStyle_2Story + HouseStyle_SFoyer + 
##     KitchenQual_Ex + KitchenQual_Fa + KitchenQual_Gd) * BedroomAbvGr, 
##     data = one_encode_custom_train_data)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -59624  -8810      0   9094  61584 
## 
## Coefficients:
##                                      Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                          180170.4     5322.5  33.851  < 2e-16 ***
## GrLivArea                            -19225.9    28099.3  -0.684 0.493980    
## Neighborhood_Blmngtn                 -84278.1   101283.3  -0.832 0.405525    
## Neighborhood_Blueste                 -20086.9    13495.3  -1.488 0.136912    
## Neighborhood_BrDale                   26800.0   197058.1   0.136 0.891845    
## Neighborhood_ClearCr                   3013.0     8101.3   0.372 0.710025    
## Neighborhood_CollgCr                   4431.3     3818.6   1.160 0.246108    
## Neighborhood_Crawfor                  13357.1     4745.8   2.814 0.004969 ** 
## Neighborhood_Edwards                 -22820.9     4143.2  -5.508 4.48e-08 ***
## Neighborhood_Gilbert                    577.8     5256.4   0.110 0.912486    
## Neighborhood_IDOTRR                   -8381.9     8122.7  -1.032 0.302330    
## Neighborhood_MeadowV                  14875.7    62015.3   0.240 0.810473    
## Neighborhood_Mitchel                  -5676.5     4636.2  -1.224 0.221058    
## Neighborhood_NAmes                   -12365.7     3556.1  -3.477 0.000525 ***
## Neighborhood_NoRidge                  21182.6     8531.5   2.483 0.013175 *  
## Neighborhood_NPkVill                 577966.3   899428.3   0.643 0.520617    
## Neighborhood_NridgHt                  11187.3     8032.3   1.393 0.163953    
## Neighborhood_NWAmes                   -6514.2     5319.8  -1.225 0.221008    
## Neighborhood_OldTown                 -19269.0     3654.9  -5.272 1.61e-07 ***
## Neighborhood_Sawyer                  -13544.7     4656.4  -2.909 0.003698 ** 
## Neighborhood_SawyerW                  -5328.8     4256.7  -1.252 0.210877    
## Neighborhood_Somerst                  19427.1     6202.7   3.132 0.001780 ** 
## Neighborhood_StoneBr                  34274.4    12128.2   2.826 0.004796 ** 
## Neighborhood_SWISU                   -11548.1     8386.5  -1.377 0.168790    
## Neighborhood_Timber                    5457.3     6555.0   0.833 0.405278    
## Neighborhood_Veenker                  30376.5    17108.5   1.776 0.076079 .  
## LotArea                                8449.8     7142.3   1.183 0.237030    
## YrSold                                  216.9      484.8   0.447 0.654718    
## SaleCondition_Abnorml                -25221.8     3440.0  -7.332 4.29e-13 ***
## SaleCondition_AdjLand              -1102878.5  1028087.9  -1.073 0.283612    
## SaleCondition_Alloca                 -20848.4    10099.6  -2.064 0.039218 *  
## SaleCondition_Family                 -16499.8     8005.8  -2.061 0.039532 *  
## SaleCondition_Normal                 -11656.3     2849.4  -4.091 4.60e-05 ***
## HouseStyle_1.5Fin                     -5012.6     3706.1  -1.353 0.176474    
## HouseStyle_1.5Unf                     -6258.1    11877.9  -0.527 0.598386    
## HouseStyle_1Story                      8197.3     3275.1   2.503 0.012457 *  
## HouseStyle_2.5Unf                       254.2    14733.0   0.017 0.986236    
## HouseStyle_2Story                     -6062.2     4356.0  -1.392 0.164285    
## HouseStyle_SFoyer                     10276.5    15781.0   0.651 0.515052    
## KitchenQual_Ex                        19039.9     3990.0   4.772 2.06e-06 ***
## KitchenQual_Fa                        -5654.1     4185.9  -1.351 0.177045    
## KitchenQual_Gd                         6316.4     1540.5   4.100 4.42e-05 ***
## YearRemodAdd                           4964.9      768.0   6.465 1.50e-10 ***
## GarageCars                             5459.0      699.4   7.805 1.34e-14 ***
## Fireplaces                             3236.9      612.6   5.284 1.51e-07 ***
## BsmtFullBath                           6218.8      553.8  11.230  < 2e-16 ***
## BsmtHalfBath                           2367.6      520.1   4.552 5.88e-06 ***
## FullBath                               2777.8      924.4   3.005 0.002714 ** 
## HalfBath                               3634.6      785.5   4.627 4.14e-06 ***
## BedroomAbvGr                         -14074.2     5894.2  -2.388 0.017111 *  
## Remodel                                -126.5      613.0  -0.206 0.836533    
## OverallQual                           13909.4      894.3  15.553  < 2e-16 ***
## GrLivArea2                            40928.4    26916.1   1.521 0.128640    
## X1stFlrSF                              7311.9     5059.2   1.445 0.148656    
## X2ndFlrSF                              5627.1     5768.4   0.975 0.329523    
## PoolArea                                357.2      570.2   0.626 0.531184    
## GrLivArea:Neighborhood_Blmngtn       289176.0   417184.3   0.693 0.488350    
## GrLivArea:Neighborhood_Blueste        -8356.5    31523.6  -0.265 0.790990    
## GrLivArea:Neighborhood_BrDale       -571189.1   761539.5  -0.750 0.453382    
## GrLivArea:Neighborhood_ClearCr        -6805.4    53675.4  -0.127 0.899130    
## GrLivArea:Neighborhood_CollgCr       -13928.2    14185.5  -0.982 0.326376    
## GrLivArea:Neighborhood_Crawfor         1256.2    20273.0   0.062 0.950603    
## GrLivArea:Neighborhood_Edwards       -12762.2    18497.7  -0.690 0.490377    
## GrLivArea:Neighborhood_Gilbert       -48176.1    26531.1  -1.816 0.069659 .  
## GrLivArea:Neighborhood_IDOTRR         -6763.9    30670.1  -0.221 0.825494    
## GrLivArea:Neighborhood_MeadowV       -74429.8    96048.5  -0.775 0.438548    
## GrLivArea:Neighborhood_Mitchel       -37517.0    27291.3  -1.375 0.169498    
## GrLivArea:Neighborhood_NAmes         -28505.8    12256.3  -2.326 0.020203 *  
## GrLivArea:Neighborhood_NPkVill      1184978.0  1913858.3   0.619 0.535937    
## GrLivArea:Neighborhood_NridgHt        27609.5    35085.4   0.787 0.431490    
## GrLivArea:Neighborhood_NWAmes         -6661.4    22242.4  -0.299 0.764620    
## GrLivArea:Neighborhood_OldTown        -9722.7    13053.4  -0.745 0.456520    
## GrLivArea:Neighborhood_Sawyer        -34800.6    16851.1  -2.065 0.039132 *  
## GrLivArea:Neighborhood_SawyerW       -21222.3    17137.6  -1.238 0.215841    
## GrLivArea:Neighborhood_Somerst       -29641.6    32167.3  -0.921 0.356993    
## GrLivArea:Neighborhood_StoneBr      -104144.7    88638.7  -1.175 0.240266    
## GrLivArea:Neighborhood_SWISU         -27668.4    18739.7  -1.476 0.140097    
## GrLivArea:Neighborhood_Timber        -11818.0    32018.2  -0.369 0.712120    
## GrLivArea:Neighborhood_Veenker      -256457.4   182591.5  -1.405 0.160430    
## GrLivArea:SaleCondition_Abnorml       18005.0    21240.4   0.848 0.396798    
## GrLivArea:SaleCondition_AdjLand     3269972.5  3008026.3   1.087 0.277230    
## GrLivArea:SaleCondition_Alloca      -109781.9    69193.0  -1.587 0.112880    
## GrLivArea:SaleCondition_Family        51520.6    42500.2   1.212 0.225670    
## GrLivArea:SaleCondition_Normal        25122.0    18781.3   1.338 0.181291    
## GrLivArea:HouseStyle_1.5Fin           17975.9    18948.6   0.949 0.342990    
## GrLivArea:HouseStyle_1.5Unf           37094.9    54026.1   0.687 0.492467    
## GrLivArea:HouseStyle_1Story           15637.7    17178.1   0.910 0.362841    
## GrLivArea:HouseStyle_2.5Unf           14932.7    80012.6   0.187 0.851985    
## GrLivArea:HouseStyle_2Story           23443.2    18715.5   1.253 0.210605    
## GrLivArea:HouseStyle_SFoyer           18441.4    54154.8   0.341 0.733520    
## GrLivArea:KitchenQual_Ex              -8003.5    15024.4  -0.533 0.594343    
## GrLivArea:KitchenQual_Fa             -27829.7    16870.8  -1.650 0.099304 .  
## GrLivArea:KitchenQual_Gd             -10325.3     8416.3  -1.227 0.220139    
## Neighborhood_Blmngtn:GrLivArea2     -334818.2   491881.8  -0.681 0.496207    
## Neighborhood_BrDale:GrLivArea2       781652.4  1041415.6   0.751 0.453068    
## Neighborhood_ClearCr:GrLivArea2        -838.7    51555.5  -0.016 0.987023    
## Neighborhood_CollgCr:GrLivArea2        6365.5    13989.8   0.455 0.649189    
## Neighborhood_Crawfor:GrLivArea2        -939.1    17956.9  -0.052 0.958301    
## Neighborhood_Edwards:GrLivArea2      -11362.9    20673.4  -0.550 0.582675    
## Neighborhood_Gilbert:GrLivArea2       40480.4    24389.0   1.660 0.097234 .  
## Neighborhood_IDOTRR:GrLivArea2         4790.9    41682.7   0.115 0.908515    
## Neighborhood_MeadowV:GrLivArea2       97207.2   123898.5   0.785 0.432868    
## Neighborhood_Mitchel:GrLivArea2       31610.5    31099.1   1.016 0.309634    
## Neighborhood_NAmes:GrLivArea2          6968.1    12271.7   0.568 0.570271    
## Neighborhood_NPkVill:GrLivArea2    -1355841.2  2156005.1  -0.629 0.529562    
## Neighborhood_NridgHt:GrLivArea2      -25531.3    29125.8  -0.877 0.380896    
## Neighborhood_NWAmes:GrLivArea2         2157.5    19321.9   0.112 0.911113    
## Neighborhood_OldTown:GrLivArea2       -4111.4    12654.2  -0.325 0.745317    
## Neighborhood_Sawyer:GrLivArea2        17661.5    17522.4   1.008 0.313698    
## Neighborhood_SawyerW:GrLivArea2       16620.1    16515.9   1.006 0.314479    
## Neighborhood_Somerst:GrLivArea2       32317.7    29857.1   1.082 0.279299    
## Neighborhood_StoneBr:GrLivArea2      124536.1    91494.5   1.361 0.173741    
## Neighborhood_SWISU:GrLivArea2         15636.5    18782.3   0.833 0.405294    
## Neighborhood_Timber:GrLivArea2        23552.6    27736.9   0.849 0.395980    
## Neighborhood_Veenker:GrLivArea2      262361.0   179884.0   1.459 0.144978    
## SaleCondition_Abnorml:GrLivArea2     -33107.9    20392.8  -1.624 0.104758    
## SaleCondition_AdjLand:GrLivArea2   -4864591.2  4493353.5  -1.083 0.279206    
## SaleCondition_Alloca:GrLivArea2       73161.7    51227.0   1.428 0.153513    
## SaleCondition_Family:GrLivArea2      -73256.0    39430.5  -1.858 0.063448 .  
## SaleCondition_Normal:GrLivArea2      -36122.4    17550.3  -2.058 0.039795 *  
## HouseStyle_1.5Fin:GrLivArea2         -10208.9    18093.3  -0.564 0.572705    
## HouseStyle_1.5Unf:GrLivArea2         -39726.5    57953.8  -0.685 0.493177    
## HouseStyle_1Story:GrLivArea2            629.7    16939.0   0.037 0.970352    
## HouseStyle_2.5Unf:GrLivArea2         -24503.0    76686.1  -0.320 0.749389    
## HouseStyle_2Story:GrLivArea2         -18227.2    17178.3  -1.061 0.288886    
## HouseStyle_SFoyer:GrLivArea2          -1568.1    73906.5  -0.021 0.983076    
## KitchenQual_Ex:GrLivArea2             26456.1    14264.5   1.855 0.063901 .  
## KitchenQual_Fa:GrLivArea2             30788.1    20428.9   1.507 0.132066    
## KitchenQual_Gd:GrLivArea2             20179.6     8638.5   2.336 0.019663 *  
## Neighborhood_Blmngtn:LotArea         -38075.1    75021.4  -0.508 0.611887    
## Neighborhood_BrDale:LotArea          -69701.5   174822.5  -0.399 0.690190    
## Neighborhood_ClearCr:LotArea           1019.6     3793.2   0.269 0.788132    
## Neighborhood_CollgCr:LotArea           1404.2     5393.7   0.260 0.794649    
## Neighborhood_Crawfor:LotArea          -3971.4     4840.3  -0.820 0.412108    
## Neighborhood_Edwards:LotArea           8203.2     4796.5   1.710 0.087496 .  
## Neighborhood_Gilbert:LotArea           -909.6     4083.8  -0.223 0.823780    
## Neighborhood_IDOTRR:LotArea            3199.5     7081.6   0.452 0.651492    
## Neighborhood_MeadowV:LotArea          10669.2    36136.2   0.295 0.767857    
## Neighborhood_Mitchel:LotArea           -936.7     4403.4  -0.213 0.831587    
## Neighborhood_NAmes:LotArea             1516.3     4288.7   0.354 0.723736    
## Neighborhood_NPkVill:LotArea         577469.3   882719.1   0.654 0.513119    
## Neighborhood_NridgHt:LotArea          32676.6     6850.5   4.770 2.08e-06 ***
## Neighborhood_NWAmes:LotArea            1315.5     5678.2   0.232 0.816827    
## Neighborhood_OldTown:LotArea           3870.6     4864.0   0.796 0.426329    
## Neighborhood_Sawyer:LotArea           -4298.9     5238.2  -0.821 0.411995    
## Neighborhood_SawyerW:LotArea           1297.5     7521.5   0.173 0.863071    
## Neighborhood_Somerst:LotArea          12493.8     5048.6   2.475 0.013480 *  
## Neighborhood_StoneBr:LotArea          14213.4     9694.8   1.466 0.142899    
## Neighborhood_SWISU:LotArea            12344.1    16615.3   0.743 0.457673    
## Neighborhood_Timber:LotArea           -4397.3     4777.7  -0.920 0.357564    
## Neighborhood_Veenker:LotArea         -20402.6    16624.3  -1.227 0.219972    
## LotArea:SaleCondition_Abnorml         -5012.2     4896.8  -1.024 0.306254    
## LotArea:SaleCondition_AdjLand         29487.3    57438.3   0.513 0.607790    
## LotArea:SaleCondition_Alloca          23340.2    20633.9   1.131 0.258226    
## LotArea:SaleCondition_Family         -13619.4    17342.1  -0.785 0.432420    
## LotArea:SaleCondition_Normal           1269.2     4070.9   0.312 0.755261    
## LotArea:HouseStyle_1.5Fin             -4060.9     5321.1  -0.763 0.445515    
## LotArea:HouseStyle_1.5Unf            -13311.1    17808.4  -0.747 0.454938    
## LotArea:HouseStyle_1Story             -6975.1     4774.0  -1.461 0.144278    
## LotArea:HouseStyle_2.5Unf             14793.3    24039.4   0.615 0.538428    
## LotArea:HouseStyle_2Story             -2659.5     4971.6  -0.535 0.592789    
## LotArea:HouseStyle_SFoyer            -10006.5    10927.2  -0.916 0.359994    
## Neighborhood_Blmngtn:BedroomAbvGr     13849.6    11191.2   1.238 0.216141    
## Neighborhood_BrDale:BedroomAbvGr      16729.8    18655.4   0.897 0.370025    
## Neighborhood_ClearCr:BedroomAbvGr      -812.4     3967.1  -0.205 0.837781    
## Neighborhood_CollgCr:BedroomAbvGr      6306.2     3782.9   1.667 0.095789 .  
## Neighborhood_Crawfor:BedroomAbvGr     -4156.5     4376.4  -0.950 0.342448    
## Neighborhood_Edwards:BedroomAbvGr      6366.6     3795.6   1.677 0.093747 .  
## Neighborhood_Gilbert:BedroomAbvGr     -1132.5     5132.9  -0.221 0.825416    
## Neighborhood_IDOTRR:BedroomAbvGr       2998.0     6157.8   0.487 0.626449    
## Neighborhood_MeadowV:BedroomAbvGr      6329.4    15735.2   0.402 0.687580    
## Neighborhood_Mitchel:BedroomAbvGr     -1304.2     3900.5  -0.334 0.738168    
## Neighborhood_NAmes:BedroomAbvGr        7311.3     3259.3   2.243 0.025076 *  
## Neighborhood_NPkVill:BedroomAbvGr     57897.2    75192.5   0.770 0.441468    
## Neighborhood_NridgHt:BedroomAbvGr    -11189.7     5185.3  -2.158 0.031138 *  
## Neighborhood_NWAmes:BedroomAbvGr      -2706.8     4756.9  -0.569 0.569451    
## Neighborhood_OldTown:BedroomAbvGr       807.4     3535.8   0.228 0.819422    
## Neighborhood_Sawyer:BedroomAbvGr       5923.8     4109.4   1.442 0.149708    
## Neighborhood_SawyerW:BedroomAbvGr      2440.7     5155.6   0.473 0.636020    
## Neighborhood_Somerst:BedroomAbvGr      4494.6     4682.0   0.960 0.337271    
## Neighborhood_StoneBr:BedroomAbvGr      4615.0     6483.1   0.712 0.476702    
## Neighborhood_SWISU:BedroomAbvGr        8484.2     5318.8   1.595 0.110958    
## Neighborhood_Timber:BedroomAbvGr      -9238.6     5517.2  -1.675 0.094302 .  
## Neighborhood_Veenker:BedroomAbvGr    -23486.3    11132.3  -2.110 0.035098 *  
## SaleCondition_Abnorml:BedroomAbvGr     4995.4     3980.2   1.255 0.209712    
## SaleCondition_Alloca:BedroomAbvGr     13356.9     7593.9   1.759 0.078862 .  
## SaleCondition_Family:BedroomAbvGr      4635.4     9052.0   0.512 0.608687    
## SaleCondition_Normal:BedroomAbvGr      5489.6     3331.8   1.648 0.099703 .  
## HouseStyle_1.5Fin:BedroomAbvGr         5579.8     4312.4   1.294 0.195963    
## HouseStyle_1.5Unf:BedroomAbvGr        11951.6    11052.1   1.081 0.279754    
## HouseStyle_1Story:BedroomAbvGr         4837.5     3870.1   1.250 0.211571    
## HouseStyle_2.5Unf:BedroomAbvGr         8306.5     6402.4   1.297 0.194753    
## HouseStyle_2Story:BedroomAbvGr         5721.5     4141.0   1.382 0.167343    
## HouseStyle_SFoyer:BedroomAbvGr         6314.2     5506.0   1.147 0.251709    
## KitchenQual_Ex:BedroomAbvGr           -7232.0     3489.9  -2.072 0.038463 *  
## KitchenQual_Fa:BedroomAbvGr           -1357.5     4516.6  -0.301 0.763805    
## KitchenQual_Gd:BedroomAbvGr           -2042.2     1813.2  -1.126 0.260285    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 16150 on 1140 degrees of freedom
## Multiple R-squared:  0.9453, Adjusted R-squared:  0.9359 
## F-statistic: 100.5 on 196 and 1140 DF,  p-value: < 2.2e-16
ols_press(lm_fit_custom)
## [1] Inf
custom_train_data_outliers = data_train[(data_train$Id %in% outliers_forward), ]
#custom_train_data_outliers
hist(custom_train_data_outliers$SalePrice)

hist(one_encode_custom_train_data$SalePrice)

custom_fit = ols_step_forward_p(lm_fit_custom, penter=0.05, details = F)
custom_fit
## 
##                                             Selection Summary                                              
## ----------------------------------------------------------------------------------------------------------
##         Variable                                           Adj.                                               
## Step                 Entered                 R-Square    R-Square      C(p)          AIC           RMSE       
## ----------------------------------------------------------------------------------------------------------
##    1    OverallQual                            0.6537      0.6534    5883.5150    31964.5900    37549.4611    
##    2    GrLivArea2                             0.7540      0.7537    3794.1994    31509.0650    31656.1468    
##    3    X1stFlrSF                              0.7968      0.7963    2905.8981    31255.9518    28786.3758    
##    4    GarageCars                             0.8188      0.8183    2448.4557    31104.4131    27190.2474    
##    5    BsmtFullBath                           0.8350      0.8344    2113.5439    30981.4397    25958.4551    
##    6    KitchenQual_Ex                         0.8485      0.8478    1833.8139    30869.1465    24881.6544    
##    7    YearRemodAdd                           0.8604      0.8597    1587.1350    30761.4440    23890.5075    
##    8    Neighborhood_OldTown                   0.8689      0.8681    1412.2581    30679.5477    23161.2990    
##    9    LotArea                                0.8760      0.8752    1266.5474    30607.2119    22534.7810    
##   10    Neighborhood_OldTown:GrLivArea2        0.8817      0.8808    1149.7371    30546.2683    22018.8241    
##   11    Neighborhood_NAmes:GrLivArea2          0.8891      0.8882     996.9927    30461.5762    21324.4556    
##   12    Neighborhood_NAmes                     0.8918      0.8908     943.8433    30431.2690    21076.3195    
##   13    Neighborhood_NWAmes                    0.8932      0.8921     917.2117    30416.1833    20949.9934    
##   14    Fireplaces                             0.8954      0.8943     871.9849    30389.5151    20734.4233    
##   15    Neighborhood_Somerst                   0.8973      0.8961     835.0573    30367.4136    20556.1544    
##   16    Neighborhood_SWISU                     0.8982      0.8970     817.7085    30357.2705    20470.7668    
##   17    BsmtHalfBath                           0.8987      0.8973     810.7671    30353.6215    20435.3083    
##   18    SaleCondition_Alloca                   0.8994      0.8980     797.4568    30345.8929    20368.8185    
##   19    HalfBath                               0.9001      0.8986     785.5329    30338.9834    20308.7704    
##   20    X2ndFlrSF                              0.9007      0.8992     774.4498    30332.5575    20252.5676    
##   21    SaleCondition_Abnorml                  0.9040      0.9025     707.1991    30289.0513    19918.3938    
##   22    SaleCondition_Normal                   0.9068      0.9052     651.2306    30251.7306    19635.1080    
##   23    Neighborhood_CollgCr                   0.9071      0.9055     646.0686    30248.7913    19606.3340    
##   24    Neighborhood_NridgHt                   0.9106      0.9089     576.2737    30200.2424    19246.5103    
##   25    Neighborhood_StoneBr                   0.9125      0.9108     538.8059    30173.6178    19048.8404    
##   26    YrSold                                 0.9126      0.9109     538.2583    30173.7489    19042.7955    
##   27    FullBath                               0.9127      0.9109     538.8387    30174.7063    19042.6420    
##   28    HouseStyle_1.5Unf                      0.9128      0.9109     538.4588    30174.9567    19037.4597    
##   29    SaleCondition_AdjLand                  0.9130      0.9110     536.3215    30173.9097    19023.0519    
##   30    Neighborhood_ClearCr                   0.9130      0.9110     537.7296    30175.4732    19027.2271    
##   31    Neighborhood_SawyerW                   0.9131      0.9110     538.5585    30176.6091    19028.3664    
##   32    Neighborhood_Gilbert                   0.9131      0.9110     539.0521    30177.4969    19027.7453    
##   33    HouseStyle_2Story                      0.9132      0.9110     540.3885    30179.0066    19031.5554    
##   34    Neighborhood_Veenker                   0.9135      0.9113     535.1362    30175.6370    19000.6693    
##   35    HouseStyle_2.5Unf                      0.9135      0.9112     536.8328    30177.4119    19006.3702    
##   36    Neighborhood_Blueste                   0.9136      0.9112     537.4703    30178.4005    19006.4888    
##   37    Neighborhood_NPkVill                   0.9136      0.9112     538.9505    30180.0144    19011.0580    
##   38    KitchenQual_Fa                         0.9136      0.9111     540.9454    30182.0107    19018.3531    
##   39    Neighborhood_Blmngtn                   0.9137      0.9111     542.1409    30183.4130    19021.4310    
##   40    Remodel                                0.9137      0.9110     543.1161    30184.6511    19023.3475    
##   41    HouseStyle_SFoyer                      0.9138      0.9111     543.4658    30185.4235    19021.9563    
##   42    Neighborhood_Timber                    0.9139      0.9111     543.5488    30185.9960    19019.1488    
##   43    Neighborhood_MeadowV                   0.9139      0.9110     544.9032    30187.5149    19023.0794    
##   44    SaleCondition_Family                   0.9145      0.9116     535.1206    30180.7044    18967.8398    
##   45    Neighborhood_Mitchel                   0.9145      0.9116     535.7699    30181.6906    18967.9922    
##   46    Neighborhood_IDOTRR                    0.9147      0.9116     535.1420    30181.7162    18961.3366    
##   47    HouseStyle_1.5Fin                      0.9148      0.9117     534.3810    30181.6385    18953.9575    
##   48    Neighborhood_BrDale                    0.9150      0.9118     532.0362    30180.3626    18938.0987    
##   49    HouseStyle_1Story                      0.9151      0.9118     532.7234    30181.3712    18938.4316    
##   50    KitchenQual_Gd                         0.9157      0.9124     521.7804    30173.5569    18876.3854    
##   51    Neighborhood_Sawyer                    0.9160      0.9127     516.4024    30169.9301    18844.0340    
##   52    BedroomAbvGr                           0.9163      0.9129     514.0782    30168.6212    18828.0574    
##   53    GrLivArea                              0.9166      0.9131     509.2254    30165.3606    18798.3749    
##   54    Neighborhood_Crawfor                   0.9174      0.9140     493.3680    30153.5540    18708.8564    
##   55    PoolArea                               0.9174      0.9139     495.1944    30155.4192    18715.2136    
##   56    Neighborhood_Edwards                   0.9202      0.9167     439.6340    30111.9153    18406.6147    
##   57    Neighborhood_NoRidge                   0.9219      0.9184     406.2572    30085.1602    18216.8552    
##   58    Neighborhood_NridgHt:LotArea           0.9239      0.9205     366.5144    30052.4156    17988.7194    
##   59    GrLivArea:Neighborhood_Somerst         0.9261      0.9226     323.7637    30016.1364    17739.9809    
##   60    HouseStyle_1Story:GrLivArea2           0.9277      0.9243     291.6698    29988.2191    17549.4815    
##   61    Neighborhood_Sawyer:GrLivArea2         0.9293      0.9259     260.5156    29960.4700    17362.1243    
##   62    Neighborhood_Edwards:GrLivArea2        0.9308      0.9274     230.6602    29933.2488    17180.1647    
##   63    Neighborhood_NridgHt:BedroomAbvGr      0.9319      0.9285     210.7754    29914.7972    17055.9616    
##   64    Neighborhood_StoneBr:GrLivArea2        0.9328      0.9294     193.2972    29898.3276    16945.2168    
##   65    GrLivArea:KitchenQual_Gd               0.9335      0.9301     180.4114    29886.0386    16861.5378    
##   66    KitchenQual_Ex:GrLivArea2              0.9347      0.9313     158.0159    29864.2859    16719.0012    
##   67    LotArea:SaleCondition_Abnorml          0.9353      0.9319     146.2512    29852.6952    16640.7948    
##   68    LotArea:HouseStyle_1Story              0.9359      0.9325     136.2766    29842.7585    16573.2077    
##   69    Neighborhood_NAmes:BedroomAbvGr        0.9363      0.9329     129.7217    29836.1650    16526.5494    
##   70    SaleCondition_Alloca:GrLivArea2        0.9366      0.9331     125.0550    29831.4298    16491.4841    
##   71    KitchenQual_Ex:BedroomAbvGr            0.9370      0.9334     120.2989    29826.5693    16455.7282    
##   72    SaleCondition_Family:BedroomAbvGr      0.9373      0.9337     115.5978    29821.7299    16420.1836    
##   73    Neighborhood_Veenker:BedroomAbvGr      0.9376      0.9340     110.9364    29816.8960    16384.7552    
##   74    KitchenQual_Gd:GrLivArea2              0.9379      0.9343     106.4679    29812.2265    16350.4134    
##   75    Neighborhood_Somerst:LotArea           0.9382      0.9346     101.9113    29807.4320    16315.3857    
##   76    Neighborhood_Edwards:LotArea           0.9385      0.9348      97.9236    29803.1968    16283.8438    
##   77    Neighborhood_StoneBr:LotArea           0.9388      0.9350      94.8681    29799.9095    16258.1308    
##   78    KitchenQual_Gd:BedroomAbvGr            0.9390      0.9352      92.3835    29797.2017    16235.9814    
##   79    Neighborhood_CollgCr:BedroomAbvGr      0.9393      0.9355      87.3813    29791.8178    16197.6488    
##   80    Neighborhood_Timber:GrLivArea2         0.9396      0.9357      84.4001    29788.5401    16172.1452    
##   81    Neighborhood_Timber:BedroomAbvGr       0.9397      0.9359      82.4780    29786.3698    16153.3748    
## ----------------------------------------------------------------------------------------------------------
outliers_forward
##   [1]    4   54   59   66   67   70   94  119  121  138  152  154  164  179  186
##  [16]  209  219  239  250  252  262  305  314  321  322  331  336  337  349  350
##  [31]  363  384  385  401  427  439  441  474  478  497  524  528  530  560  567
##  [46]  569  582  584  586  589  592  598  608  622  633  636  641  643  656  662
##  [61]  665  682  686  689  692  703  713  725  745  770  775  779  799  804  811
##  [76]  813  823  826  841  876  878  886  898  899  926  940  962  971 1018 1025
##  [91] 1032 1045 1047 1049 1063 1066 1069 1128 1143 1156 1169 1170 1174 1176 1182
## [106] 1183 1217 1268 1269 1285 1299 1311 1323 1325 1327 1329 1360 1387 1389 1397
## [121] 1416 1424 1441
custom_model = custom_fit$model
ols_press(custom_model)
## [1] 440336132483
formatC(ols_press(custom_model), format = "e", digits = 6)
## [1] "4.403361e+11"
summary(custom_model)
## 
## Call:
## lm(formula = paste(response, "~", paste(preds, collapse = " + ")), 
##     data = l)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -61121  -9527     61  10020  56416 
## 
## Coefficients:
##                                   Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                       179953.8     4108.2  43.803  < 2e-16 ***
## OverallQual                        14228.6      824.2  17.264  < 2e-16 ***
## GrLivArea2                         10338.9     4975.7   2.078 0.037923 *  
## X1stFlrSF                           7709.7     4147.6   1.859 0.063283 .  
## GarageCars                          5627.9      634.8   8.866  < 2e-16 ***
## BsmtFullBath                        6680.9      514.5  12.986  < 2e-16 ***
## KitchenQual_Ex                     19360.8     3538.2   5.472 5.37e-08 ***
## YearRemodAdd                        5229.3      717.3   7.290 5.47e-13 ***
## Neighborhood_OldTown              -18923.2     2812.2  -6.729 2.59e-11 ***
## LotArea                             7101.4     1164.9   6.096 1.45e-09 ***
## Neighborhood_NAmes                -10660.6     2850.6  -3.740 0.000192 ***
## Neighborhood_NWAmes                -6015.4     3573.8  -1.683 0.092588 .  
## Fireplaces                          3234.3      573.3   5.642 2.08e-08 ***
## Neighborhood_Somerst               14706.8     4220.9   3.484 0.000510 ***
## Neighborhood_SWISU                -10917.7     4497.4  -2.428 0.015341 *  
## BsmtHalfBath                        2407.1      477.9   5.037 5.41e-07 ***
## SaleCondition_Alloca              -28567.6     6468.3  -4.417 1.09e-05 ***
## HalfBath                            3349.2      726.0   4.613 4.37e-06 ***
## X2ndFlrSF                           4914.6     4910.5   1.001 0.317101    
## SaleCondition_Abnorml             -26225.7     2701.0  -9.709  < 2e-16 ***
## SaleCondition_Normal              -13261.4     2031.8  -6.527 9.72e-11 ***
## Neighborhood_CollgCr                5351.4     3166.5   1.690 0.091273 .  
## Neighborhood_NridgHt               20831.1     4136.4   5.036 5.45e-07 ***
## Neighborhood_StoneBr               23910.2     7535.4   3.173 0.001545 ** 
## YrSold                               241.5      464.2   0.520 0.602958    
## FullBath                            2482.2      789.4   3.145 0.001703 ** 
## HouseStyle_1.5Unf                  -6726.8     5126.0  -1.312 0.189660    
## SaleCondition_AdjLand             -17855.1     8779.7  -2.034 0.042195 *  
## Neighborhood_ClearCr                4291.5     5036.5   0.852 0.394335    
## Neighborhood_SawyerW               -4718.2     3600.5  -1.310 0.190284    
## Neighborhood_Gilbert               -2964.4     3571.4  -0.830 0.406677    
## HouseStyle_2Story                  -3140.3     3467.4  -0.906 0.365287    
## Neighborhood_Veenker                9780.1     7030.6   1.391 0.164449    
## HouseStyle_2.5Unf                  -6074.0     6587.8  -0.922 0.356701    
## Neighborhood_Blueste              -16382.5    11932.6  -1.373 0.170024    
## Neighborhood_NPkVill               -7873.0     6247.2  -1.260 0.207814    
## KitchenQual_Fa                     -4330.3     2982.7  -1.452 0.146799    
## Neighborhood_Blmngtn              -10333.9     5587.6  -1.849 0.064629 .  
## Remodel                             -571.7      579.3  -0.987 0.323873    
## HouseStyle_SFoyer                  -1508.5     3834.1  -0.393 0.694065    
## Neighborhood_Timber                 4804.7     4460.3   1.077 0.281594    
## Neighborhood_MeadowV              -14944.7     5153.7  -2.900 0.003799 ** 
## SaleCondition_Family              -11047.5     5454.1  -2.026 0.043024 *  
## Neighborhood_Mitchel               -3993.2     3558.6  -1.122 0.262020    
## Neighborhood_IDOTRR               -10162.2     3485.8  -2.915 0.003616 ** 
## HouseStyle_1.5Fin                  -2592.6     3170.4  -0.818 0.413663    
## Neighborhood_BrDale               -18381.7     5350.4  -3.436 0.000611 ***
## HouseStyle_1Story                   7343.4     2627.6   2.795 0.005274 ** 
## KitchenQual_Gd                      5945.4     1413.4   4.207 2.78e-05 ***
## Neighborhood_Sawyer               -11726.6     3603.8  -3.254 0.001168 ** 
## BedroomAbvGr                        -995.4      885.3  -1.124 0.261081    
## GrLivArea                           -297.4     6980.1  -0.043 0.966022    
## Neighborhood_Crawfor               15736.8     3580.5   4.395 1.20e-05 ***
## PoolArea                             468.1      497.4   0.941 0.346881    
## Neighborhood_Edwards              -18433.1     3292.1  -5.599 2.64e-08 ***
## Neighborhood_NoRidge               25487.9     4608.1   5.531 3.87e-08 ***
## GrLivArea2:Neighborhood_OldTown    -9818.3     1863.7  -5.268 1.62e-07 ***
## GrLivArea2:Neighborhood_NAmes     -16323.9     1880.8  -8.679  < 2e-16 ***
## LotArea:Neighborhood_NridgHt       38169.3     5283.6   7.224 8.73e-13 ***
## Neighborhood_Somerst:GrLivArea     13706.8     3677.5   3.727 0.000202 ***
## GrLivArea2:HouseStyle_1Story       10345.3     2100.2   4.926 9.52e-07 ***
## GrLivArea2:Neighborhood_Sawyer    -12286.6     3027.3  -4.059 5.24e-05 ***
## GrLivArea2:Neighborhood_Edwards   -13141.4     3087.0  -4.257 2.23e-05 ***
## Neighborhood_NridgHt:BedroomAbvGr -13255.0     3696.5  -3.586 0.000349 ***
## GrLivArea2:Neighborhood_StoneBr    27880.3    10138.4   2.750 0.006045 ** 
## KitchenQual_Gd:GrLivArea           -6544.1     6244.9  -1.048 0.294881    
## GrLivArea2:KitchenQual_Ex          20344.9     2794.4   7.281 5.85e-13 ***
## LotArea:SaleCondition_Abnorml      -8952.8     2277.9  -3.930 8.95e-05 ***
## LotArea:HouseStyle_1Story          -3563.8     1249.0  -2.853 0.004398 ** 
## Neighborhood_NAmes:BedroomAbvGr     4913.5     1618.2   3.036 0.002444 ** 
## GrLivArea2:SaleCondition_Alloca    12573.7     3499.4   3.593 0.000339 ***
## KitchenQual_Ex:BedroomAbvGr        -8596.5     2663.7  -3.227 0.001282 ** 
## SaleCondition_Family:BedroomAbvGr  -9852.4     3846.3  -2.562 0.010537 *  
## Neighborhood_Veenker:BedroomAbvGr -14390.1     6340.4  -2.270 0.023401 *  
## GrLivArea2:KitchenQual_Gd          17078.5     6210.2   2.750 0.006044 ** 
## LotArea:Neighborhood_Somerst       10989.1     3645.2   3.015 0.002624 ** 
## LotArea:Neighborhood_Edwards        8128.3     3223.7   2.521 0.011813 *  
## LotArea:Neighborhood_StoneBr       19135.3     7879.5   2.429 0.015301 *  
## KitchenQual_Gd:BedroomAbvGr        -3908.8     1419.9  -2.753 0.005992 ** 
## Neighborhood_CollgCr:BedroomAbvGr   5497.3     2052.1   2.679 0.007485 ** 
## GrLivArea2:Neighborhood_Timber     13657.9     4584.2   2.979 0.002944 ** 
## Neighborhood_Timber:BedroomAbvGr   -9387.7     4741.1  -1.980 0.047914 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 16150 on 1255 degrees of freedom
## Multiple R-squared:  0.9397, Adjusted R-squared:  0.9359 
## F-statistic: 241.7 on 81 and 1255 DF,  p-value: < 2.2e-16
#confint(custom_model)
ols_plot_cooksd_bar(custom_model)

custom_model_outliers = ols_plot_cooksd_bar(custom_model, print_plot=F)
custom_model_outliers
## $plot

## 
## $outliers
##      observation cooks_distance
## 4              4    0.003543888
## 6              6    0.003399545
## 13            13    0.004289133
## 28            28    0.003642190
## 30            30    0.005823876
## 55            55    0.013135587
## 96            96    0.004212178
## 106          106    0.008018093
## 107          107    0.023823538
## 135          135    0.003207307
## 143          143    0.003759305
## 157          157    0.003372909
## 163          163    0.005291487
## 183          183    0.021003983
## 208          208    0.005288475
## 215          215    0.003625828
## 296          296    0.007138951
## 302          302    0.024511245
## 304          304    0.005066521
## 347          347    0.007643672
## 354          354    0.003353417
## 357          357    0.005383267
## 375          375    0.004028943
## 384          384    0.003289255
## 385          385    0.005366861
## 387          387    0.006309380
## 415          415    0.004794333
## 421          421    0.005413910
## 426          426    0.004153642
## 434          434    0.004934384
## 437          437    0.003180215
## 443          443    0.003425909
## 444          444    0.004208544
## 464          464    0.005042230
## 498          498    0.005749834
## 504          504    0.005139997
## 520          520    0.004867591
## 525          525    0.005480573
## 556          556    3.005120700
## 587          587    0.003501458
## 600          600    0.003686513
## 603          603    0.004985053
## 616          616    0.004035460
## 618          618    0.008860284
## 628          628    0.004164920
## 636          636    0.004031839
## 641          641    0.028359000
## 652          652    0.003252106
## 661          661    0.006418077
## 671          671    0.028162367
## 679          679    0.015855310
## 697          697    0.004238421
## 736          736    0.003642279
## 751          751    0.008499661
## 770          770    0.003713512
## 786          786    0.004355492
## 813          813    0.004256891
## 842          842    0.005525438
## 877          877    0.005078961
## 886          886    0.003827759
## 887          887    0.003535544
## 900          900    0.007303184
## 903          903    0.003223335
## 932          932    0.003599037
## 941          941    0.004401580
## 946          946    0.003023951
## 950          950    0.003161612
## 952          952    0.003676440
## 976          976    0.003331366
## 1001        1001    0.022062877
## 1004        1004    0.003273019
## 1030        1030    0.003335776
## 1033        1033    0.004782949
## 1047        1047    0.003201613
## 1058        1058    0.003184410
## 1064        1064    0.013880367
## 1065        1065    0.005091751
## 1069        1069    0.030098398
## 1079        1079    0.003609284
## 1117        1117    0.003222361
## 1120        1120    0.005935099
## 1124        1124    0.026440754
## 1133        1133    0.003600535
## 1137        1137    0.009515901
## 1138        1138    0.003727963
## 1144        1144    0.003180165
## 1147        1147    0.008787862
## 1173        1173    0.003019987
## 1204        1204    0.003495404
## 1229        1229    0.003421068
## 1234        1234    0.003323490
## 1240        1240    0.003166986
## 1245        1245    0.007816497
## 1265        1265    0.003571352
## 1267        1267    0.005078423
## 1270        1270    0.003153578
## 1277        1277    0.008436338
## 1284        1284    0.009064145
## 1311        1311    0.004150049
## 
## $threshold
## [1] 0.002991773
ols_plot_dffits(custom_model)

ols_plot_diagnostics(custom_model)

ols_plot_resid_fit(custom_model)

ols_plot_resid_pot(custom_model)

ols_pred_rsq(custom_model)
## [1] 0.9189806
plot(custom_fit)

custom_model_outliers$outliers$observation
##  [1]    4    6   13   28   30   55   96  106  107  135  143  157  163  183  208
## [16]  215  296  302  304  347  354  357  375  384  385  387  415  421  426  434
## [31]  437  443  444  464  498  504  520  525  556  587  600  603  616  618  628
## [46]  636  641  652  661  671  679  697  736  751  770  786  813  842  877  886
## [61]  887  900  903  932  941  946  950  952  976 1001 1004 1030 1033 1047 1058
## [76] 1064 1065 1069 1079 1117 1120 1124 1133 1137 1138 1144 1147 1173 1204 1229
## [91] 1234 1240 1245 1265 1267 1270 1277 1284 1311
custom_predictions = c(predict(custom_model, newdata = one_encode_custom_test_data))
#custom_predictions

custom_submission = data.frame(Id= one_encode_custom_test_data$Id, SalePrice=custom_predictions)
#custom_submission
#write_csv(custom_submission, "../kaggleData/customSelection3Predictions.csv")
custom1_vif = VIF(custom_model)
c(custom1_vif)
##                       OverallQual                        GrLivArea2 
##                          3.477800                        126.762273 
##                         X1stFlrSF                        GarageCars 
##                         88.078655                          2.063084 
##                      BsmtFullBath                    KitchenQual_Ex 
##                          1.355247                          2.923617 
##                      YearRemodAdd              Neighborhood_OldTown 
##                          2.634656                          2.957955 
##                           LotArea                Neighborhood_NAmes 
##                          6.948472                          5.744746 
##               Neighborhood_NWAmes                        Fireplaces 
##                          3.071139                          1.682766 
##              Neighborhood_Somerst                Neighborhood_SWISU 
##                          5.255422                          1.527162 
##                      BsmtHalfBath              SaleCondition_Alloca 
##                          1.169157                          1.275071 
##                          HalfBath                         X2ndFlrSF 
##                          2.698535                        123.463454 
##             SaleCondition_Abnorml              SaleCondition_Normal 
##                          2.395320                          2.854522 
##              Neighborhood_CollgCr              Neighborhood_NridgHt 
##                          5.057512                          3.518294 
##              Neighborhood_StoneBr                            YrSold 
##                          2.801473                          1.103324 
##                          FullBath                 HouseStyle_1.5Unf 
##                          3.190475                          1.493529 
##             SaleCondition_AdjLand              Neighborhood_ClearCr 
##                          1.178133                          1.820818 
##              Neighborhood_SawyerW              Neighborhood_Gilbert 
##                          2.482942                          3.503867 
##                 HouseStyle_2Story              Neighborhood_Veenker 
##                         12.935394                          1.506393 
##                 HouseStyle_2.5Unf              Neighborhood_Blueste 
##                          1.486847                          1.089745 
##              Neighborhood_NPkVill                    KitchenQual_Fa 
##                          1.337048                          1.194358 
##              Neighborhood_Blmngtn                           Remodel 
##                          1.657583                          1.718222 
##                 HouseStyle_SFoyer               Neighborhood_Timber 
##                          1.973592                          2.381406 
##              Neighborhood_MeadowV              SaleCondition_Family 
##                          1.609204                          1.579370 
##              Neighborhood_Mitchel               Neighborhood_IDOTRR 
##                          2.200802                          1.631235 
##                 HouseStyle_1.5Fin               Neighborhood_BrDale 
##                          4.858822                          1.627201 
##                 HouseStyle_1Story                    KitchenQual_Gd 
##                          8.843804                          2.452199 
##               Neighborhood_Sawyer                      BedroomAbvGr 
##                          3.435067                          4.013172 
##                         GrLivArea              Neighborhood_Crawfor 
##                        249.459064                          1.998721 
##                          PoolArea              Neighborhood_Edwards 
##                          1.266842                          3.558421 
##              Neighborhood_NoRidge   GrLivArea2:Neighborhood_OldTown 
##                          2.696540                          1.498841 
##     GrLivArea2:Neighborhood_NAmes      LotArea:Neighborhood_NridgHt 
##                          2.739910                          2.118146 
##    Neighborhood_Somerst:GrLivArea      GrLivArea2:HouseStyle_1Story 
##                          1.895161                          5.937463 
##    GrLivArea2:Neighborhood_Sawyer   GrLivArea2:Neighborhood_Edwards 
##                          1.862621                          1.929414 
## Neighborhood_NridgHt:BedroomAbvGr   GrLivArea2:Neighborhood_StoneBr 
##                          2.534722                          1.759247 
##          KitchenQual_Gd:GrLivArea         GrLivArea2:KitchenQual_Ex 
##                         80.111946                          3.411086 
##     LotArea:SaleCondition_Abnorml         LotArea:HouseStyle_1Story 
##                          1.261825                          5.609563 
##   Neighborhood_NAmes:BedroomAbvGr   GrLivArea2:SaleCondition_Alloca 
##                          2.213100                          1.507463 
##       KitchenQual_Ex:BedroomAbvGr SaleCondition_Family:BedroomAbvGr 
##                          2.162747                          1.442640 
## Neighborhood_Veenker:BedroomAbvGr         GrLivArea2:KitchenQual_Gd 
##                          1.298424                         91.857015 
##      LotArea:Neighborhood_Somerst      LotArea:Neighborhood_Edwards 
##                          2.253445                          1.174233 
##      LotArea:Neighborhood_StoneBr       KitchenQual_Gd:BedroomAbvGr 
##                          1.788748                          3.682856 
## Neighborhood_CollgCr:BedroomAbvGr    GrLivArea2:Neighborhood_Timber 
##                          1.512475                          2.738361 
##  Neighborhood_Timber:BedroomAbvGr 
##                          2.277508
#one_encode_custom_train_data_model2
one_encode_custom_train_data_model2 = one_encode_custom_train_data

one_encode_custom_train_data_model2$index = seq.int(nrow(one_encode_custom_train_data_model2))
#one_encode_custom_train_data_model2



 custom_model_1_outliers = c( 556)
#
#
#
 one_encode_custom_train_data_model2 = one_encode_custom_train_data_model2[!(one_encode_custom_train_data_model2$index %in% custom_model_1_outliers), ]

 # one_encode_custom_train_data_model2
#
#
#get original data again without all the outliers. This way we can scale it using only the values we will utilize, we do this to avoid data leaking
 final_one_encode_custom_train_data_model2 = data_train[(data_train$Id %in% one_encode_custom_train_data_model2$Id), ]
 #final_one_encode_custom_train_data_model2
# do all the data preprossesing again
final_one_encode_custom_train_data_model2 = final_one_encode_custom_train_data_model2 %>% select(Id, selected_features_q2,  SalePrice)


# # 2.5Fin does not exist in test data so changing it to 1.5Unf
final_one_encode_custom_train_data_model2$HouseStyle = as.character(final_one_encode_custom_train_data_model2$HouseStyle)
final_one_encode_custom_train_data_model2 = final_one_encode_custom_train_data_model2 %>%   mutate_at(vars(HouseStyle) ,     ~ifelse(.x=="2.5Fin","1.5Unf",.x  ))

final_one_encode_custom_train_data_model2$HouseStyle = as.factor(final_one_encode_custom_train_data_model2$HouseStyle)

custom2_train_data_process = preProcess(final_one_encode_custom_train_data_model2[,2:22], method=c("center", "scale"))
final_one_encode_custom_train_data_model2 =  predict(custom2_train_data_process, final_one_encode_custom_train_data_model2)

final_custom_test_data = data_test %>%  select(Id, selected_features_q2)
final_custom_test_data =  predict(custom2_train_data_process, final_custom_test_data)


final_custom_test_data$KitchenQual = as.character(final_custom_test_data$KitchenQual)
final_custom_test_data = final_custom_test_data %>%   mutate_at(vars(KitchenQual) ,     ~ifelse(is.na(.x),"Ex",.x  ))
final_custom_test_data$KitchenQual = as.factor(final_custom_test_data$KitchenQual)

#  Impute = NA in test data
final_custom_test_data= final_custom_test_data %>% mutate_at(vars(GarageCars),~ifelse(is.na(.x), median(.x, na.rm = TRUE), .x))
final_custom_test_data= final_custom_test_data %>% mutate_at(vars(BsmtFullBath),~ifelse(is.na(.x), median(.x, na.rm = TRUE), .x))
final_custom_test_data= final_custom_test_data %>% mutate_at(vars(BsmtHalfBath),~ifelse(is.na(.x), median(.x, na.rm = TRUE), .x))




one_encode_custom_train_data2=  one_hot(as.data.table(final_one_encode_custom_train_data_model2, dropUnusedLevels=TRUE))

one_encode_custom_test_data2 =  one_hot(as.data.table(final_custom_test_data, dropUnusedLevels=TRUE))


# #References: Neighborhood_BrkSide KitchenQual_TA HouseStyle_SLvl SaleCondition_Partial
# # Manual exclusion:
# # take away PoolArea due to 0 variance warning
# #SaleCondition_AdjLand:GrLivArea2           NA         NA      NA       NA
# #SaleCondition_Alloca:GrLivArea2            NA         NA      NA       NA
# #LotArea:SaleCondition_AdjLand              NA         NA      NA       NA
# #LotArea:SaleCondition_Alloca               NA         NA      NA       NA
# #SaleCondition_Alloca:BedroomAbvGr          NA         NA      NA       NA

lm_fit_custom2 = lm(SalePrice ~.-SaleCondition_Partial-Id-HouseStyle_SLvl-Neighborhood_BrkSide-KitchenQual_TA-PoolArea+

                  (Neighborhood_Blmngtn+Neighborhood_Blueste+Neighborhood_BrDale+Neighborhood_ClearCr+Neighborhood_CollgCr+Neighborhood_Crawfor+Neighborhood_Edwards+Neighborhood_Gilbert+Neighborhood_IDOTRR+Neighborhood_MeadowV+Neighborhood_Mitchel+Neighborhood_NAmes+Neighborhood_NPkVill+Neighborhood_NridgHt+Neighborhood_NWAmes+Neighborhood_OldTown+Neighborhood_Sawyer+Neighborhood_SawyerW+Neighborhood_Somerst+Neighborhood_StoneBr+Neighborhood_SWISU+Neighborhood_Timber+Neighborhood_Veenker+SaleCondition_Abnorml+SaleCondition_Family+SaleCondition_Normal+HouseStyle_1.5Fin+HouseStyle_1.5Unf+HouseStyle_1Story+HouseStyle_2.5Unf+HouseStyle_2Story+HouseStyle_SFoyer+KitchenQual_Ex+KitchenQual_Fa+KitchenQual_Gd )*GrLivArea +

                  (Neighborhood_Blmngtn+Neighborhood_BrDale+Neighborhood_ClearCr+Neighborhood_CollgCr+Neighborhood_Crawfor+Neighborhood_Edwards+Neighborhood_Gilbert+Neighborhood_IDOTRR+Neighborhood_MeadowV+Neighborhood_Mitchel+Neighborhood_NAmes+Neighborhood_NPkVill+Neighborhood_NridgHt+Neighborhood_NWAmes+Neighborhood_OldTown+Neighborhood_Sawyer+Neighborhood_SawyerW+Neighborhood_Somerst+Neighborhood_StoneBr+Neighborhood_SWISU+Neighborhood_Timber+Neighborhood_Veenker+SaleCondition_Abnorml+SaleCondition_AdjLand+SaleCondition_Family+SaleCondition_Normal+HouseStyle_1.5Fin+HouseStyle_1.5Unf+HouseStyle_1Story+HouseStyle_2.5Unf+HouseStyle_2Story+HouseStyle_SFoyer+KitchenQual_Ex+KitchenQual_Fa+KitchenQual_Gd)*GrLivArea2 +

                  (Neighborhood_Blmngtn+Neighborhood_BrDale+Neighborhood_ClearCr+Neighborhood_CollgCr+Neighborhood_Crawfor+Neighborhood_Edwards+Neighborhood_Gilbert+Neighborhood_IDOTRR+Neighborhood_MeadowV+Neighborhood_Mitchel+Neighborhood_NAmes+Neighborhood_NPkVill+Neighborhood_NridgHt+Neighborhood_NWAmes+Neighborhood_OldTown+Neighborhood_Sawyer+Neighborhood_SawyerW+Neighborhood_Somerst+Neighborhood_StoneBr+Neighborhood_SWISU+Neighborhood_Timber+Neighborhood_Veenker+SaleCondition_Abnorml++SaleCondition_Family+SaleCondition_Normal+HouseStyle_1.5Fin+HouseStyle_1.5Unf+HouseStyle_1Story+HouseStyle_2.5Unf+HouseStyle_2Story+HouseStyle_SFoyer)*LotArea +

                  (Neighborhood_Blmngtn+Neighborhood_BrDale+Neighborhood_ClearCr+Neighborhood_CollgCr+Neighborhood_Crawfor+Neighborhood_Edwards+Neighborhood_Gilbert+Neighborhood_IDOTRR+Neighborhood_MeadowV+Neighborhood_Mitchel+Neighborhood_NAmes+Neighborhood_NPkVill+Neighborhood_NridgHt+Neighborhood_NWAmes+Neighborhood_OldTown+Neighborhood_Sawyer+Neighborhood_SawyerW+Neighborhood_Somerst+Neighborhood_StoneBr+Neighborhood_SWISU+Neighborhood_Timber+Neighborhood_Veenker+SaleCondition_Abnorml+SaleCondition_Family+SaleCondition_Normal+HouseStyle_1.5Fin+HouseStyle_1.5Unf+HouseStyle_1Story+HouseStyle_2.5Unf+HouseStyle_2Story+HouseStyle_SFoyer+KitchenQual_Ex+KitchenQual_Fa+KitchenQual_Gd ) * BedroomAbvGr

                , data = one_encode_custom_train_data2)



summary(lm_fit_custom2) 
## 
## Call:
## lm(formula = SalePrice ~ . - SaleCondition_Partial - Id - HouseStyle_SLvl - 
##     Neighborhood_BrkSide - KitchenQual_TA - PoolArea + (Neighborhood_Blmngtn + 
##     Neighborhood_Blueste + Neighborhood_BrDale + Neighborhood_ClearCr + 
##     Neighborhood_CollgCr + Neighborhood_Crawfor + Neighborhood_Edwards + 
##     Neighborhood_Gilbert + Neighborhood_IDOTRR + Neighborhood_MeadowV + 
##     Neighborhood_Mitchel + Neighborhood_NAmes + Neighborhood_NPkVill + 
##     Neighborhood_NridgHt + Neighborhood_NWAmes + Neighborhood_OldTown + 
##     Neighborhood_Sawyer + Neighborhood_SawyerW + Neighborhood_Somerst + 
##     Neighborhood_StoneBr + Neighborhood_SWISU + Neighborhood_Timber + 
##     Neighborhood_Veenker + SaleCondition_Abnorml + SaleCondition_Family + 
##     SaleCondition_Normal + HouseStyle_1.5Fin + HouseStyle_1.5Unf + 
##     HouseStyle_1Story + HouseStyle_2.5Unf + HouseStyle_2Story + 
##     HouseStyle_SFoyer + KitchenQual_Ex + KitchenQual_Fa + KitchenQual_Gd) * 
##     GrLivArea + (Neighborhood_Blmngtn + Neighborhood_BrDale + 
##     Neighborhood_ClearCr + Neighborhood_CollgCr + Neighborhood_Crawfor + 
##     Neighborhood_Edwards + Neighborhood_Gilbert + Neighborhood_IDOTRR + 
##     Neighborhood_MeadowV + Neighborhood_Mitchel + Neighborhood_NAmes + 
##     Neighborhood_NPkVill + Neighborhood_NridgHt + Neighborhood_NWAmes + 
##     Neighborhood_OldTown + Neighborhood_Sawyer + Neighborhood_SawyerW + 
##     Neighborhood_Somerst + Neighborhood_StoneBr + Neighborhood_SWISU + 
##     Neighborhood_Timber + Neighborhood_Veenker + SaleCondition_Abnorml + 
##     SaleCondition_AdjLand + SaleCondition_Family + SaleCondition_Normal + 
##     HouseStyle_1.5Fin + HouseStyle_1.5Unf + HouseStyle_1Story + 
##     HouseStyle_2.5Unf + HouseStyle_2Story + HouseStyle_SFoyer + 
##     KitchenQual_Ex + KitchenQual_Fa + KitchenQual_Gd) * GrLivArea2 + 
##     (Neighborhood_Blmngtn + Neighborhood_BrDale + Neighborhood_ClearCr + 
##         Neighborhood_CollgCr + Neighborhood_Crawfor + Neighborhood_Edwards + 
##         Neighborhood_Gilbert + Neighborhood_IDOTRR + Neighborhood_MeadowV + 
##         Neighborhood_Mitchel + Neighborhood_NAmes + Neighborhood_NPkVill + 
##         Neighborhood_NridgHt + Neighborhood_NWAmes + Neighborhood_OldTown + 
##         Neighborhood_Sawyer + Neighborhood_SawyerW + Neighborhood_Somerst + 
##         Neighborhood_StoneBr + Neighborhood_SWISU + Neighborhood_Timber + 
##         Neighborhood_Veenker + SaleCondition_Abnorml + +SaleCondition_Family + 
##         SaleCondition_Normal + HouseStyle_1.5Fin + HouseStyle_1.5Unf + 
##         HouseStyle_1Story + HouseStyle_2.5Unf + HouseStyle_2Story + 
##         HouseStyle_SFoyer) * LotArea + (Neighborhood_Blmngtn + 
##     Neighborhood_BrDale + Neighborhood_ClearCr + Neighborhood_CollgCr + 
##     Neighborhood_Crawfor + Neighborhood_Edwards + Neighborhood_Gilbert + 
##     Neighborhood_IDOTRR + Neighborhood_MeadowV + Neighborhood_Mitchel + 
##     Neighborhood_NAmes + Neighborhood_NPkVill + Neighborhood_NridgHt + 
##     Neighborhood_NWAmes + Neighborhood_OldTown + Neighborhood_Sawyer + 
##     Neighborhood_SawyerW + Neighborhood_Somerst + Neighborhood_StoneBr + 
##     Neighborhood_SWISU + Neighborhood_Timber + Neighborhood_Veenker + 
##     SaleCondition_Abnorml + SaleCondition_Family + SaleCondition_Normal + 
##     HouseStyle_1.5Fin + HouseStyle_1.5Unf + HouseStyle_1Story + 
##     HouseStyle_2.5Unf + HouseStyle_2Story + HouseStyle_SFoyer + 
##     KitchenQual_Ex + KitchenQual_Fa + KitchenQual_Gd) * BedroomAbvGr, 
##     data = one_encode_custom_train_data2)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -59540  -8851      0   9347  61463 
## 
## Coefficients:
##                                      Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                         1.809e+05  5.257e+03  34.415  < 2e-16 ***
## GrLivArea                          -2.150e+04  2.755e+04  -0.780 0.435319    
## Neighborhood_Blmngtn               -7.837e+04  1.006e+05  -0.779 0.436267    
## Neighborhood_Blueste               -2.060e+04  1.346e+04  -1.530 0.126326    
## Neighborhood_BrDale                 2.897e+04  1.967e+05   0.147 0.882961    
## Neighborhood_ClearCr                2.933e+03  8.068e+03   0.364 0.716261    
## Neighborhood_CollgCr                4.109e+03  3.809e+03   1.079 0.280871    
## Neighborhood_Crawfor                1.321e+04  4.741e+03   2.786 0.005420 ** 
## Neighborhood_Edwards               -2.262e+04  4.117e+03  -5.494 4.83e-08 ***
## Neighborhood_Gilbert                1.699e+01  5.234e+03   0.003 0.997410    
## Neighborhood_IDOTRR                -8.371e+03  8.052e+03  -1.040 0.298712    
## Neighborhood_MeadowV                1.308e+04  6.184e+04   0.212 0.832468    
## Neighborhood_Mitchel               -6.200e+03  4.603e+03  -1.347 0.178285    
## Neighborhood_NAmes                 -1.245e+04  3.549e+03  -3.507 0.000471 ***
## Neighborhood_NoRidge                2.068e+04  8.528e+03   2.425 0.015467 *  
## Neighborhood_NPkVill                5.927e+05  9.024e+05   0.657 0.511470    
## Neighborhood_NridgHt                1.018e+04  7.988e+03   1.274 0.202966    
## Neighborhood_NWAmes                -6.869e+03  5.311e+03  -1.293 0.196140    
## Neighborhood_OldTown               -1.923e+04  3.650e+03  -5.267 1.65e-07 ***
## Neighborhood_Sawyer                -1.408e+04  4.623e+03  -3.046 0.002370 ** 
## Neighborhood_SawyerW               -5.920e+03  4.218e+03  -1.403 0.160768    
## Neighborhood_Somerst                1.878e+04  6.178e+03   3.039 0.002425 ** 
## Neighborhood_StoneBr                3.445e+04  1.206e+04   2.857 0.004348 ** 
## Neighborhood_SWISU                 -1.175e+04  8.390e+03  -1.400 0.161811    
## Neighborhood_Timber                 4.896e+03  6.542e+03   0.748 0.454374    
## Neighborhood_Veenker                2.979e+04  1.693e+04   1.759 0.078838 .  
## LotArea                             9.089e+03  7.005e+03   1.297 0.194729    
## YrSold                              2.383e+02  4.841e+02   0.492 0.622658    
## SaleCondition_Abnorml              -2.574e+04  3.390e+03  -7.594 6.42e-14 ***
## SaleCondition_AdjLand               6.668e+03  5.880e+04   0.113 0.909739    
## SaleCondition_Alloca               -2.589e+04  7.967e+03  -3.249 0.001190 ** 
## SaleCondition_Family               -1.671e+04  7.963e+03  -2.098 0.036099 *  
## SaleCondition_Normal               -1.219e+04  2.795e+03  -4.361 1.41e-05 ***
## HouseStyle_1.5Fin                  -5.084e+03  3.684e+03  -1.380 0.167771    
## HouseStyle_1.5Unf                  -6.428e+03  1.191e+04  -0.540 0.589451    
## HouseStyle_1Story                   7.921e+03  3.258e+03   2.431 0.015209 *  
## HouseStyle_2.5Unf                   8.837e+02  1.470e+04   0.060 0.952070    
## HouseStyle_2Story                  -6.046e+03  4.334e+03  -1.395 0.163265    
## HouseStyle_SFoyer                   6.201e+03  1.514e+04   0.410 0.682168    
## KitchenQual_Ex                      1.870e+04  3.987e+03   4.688 3.08e-06 ***
## KitchenQual_Fa                     -5.981e+03  4.145e+03  -1.443 0.149307    
## KitchenQual_Gd                      6.314e+03  1.538e+03   4.106 4.31e-05 ***
## YearRemodAdd                        4.885e+03  7.639e+02   6.395 2.34e-10 ***
## GarageCars                          5.316e+03  6.938e+02   7.663 3.86e-14 ***
## Fireplaces                          3.263e+03  6.110e+02   5.341 1.11e-07 ***
## BsmtFullBath                        6.436e+03  5.440e+02  11.831  < 2e-16 ***
## BsmtHalfBath                        2.388e+03  5.196e+02   4.596 4.77e-06 ***
## FullBath                            3.111e+03  8.987e+02   3.461 0.000558 ***
## HalfBath                            3.716e+03  7.821e+02   4.751 2.28e-06 ***
## BedroomAbvGr                       -1.382e+04  5.587e+03  -2.474 0.013496 *  
## Remodel                            -7.038e+01  6.114e+02  -0.115 0.908383    
## OverallQual                         1.394e+04  8.927e+02  15.614  < 2e-16 ***
## GrLivArea2                          4.149e+04  2.621e+04   1.583 0.113709    
## X1stFlrSF                           7.187e+03  5.040e+03   1.426 0.154128    
## X2ndFlrSF                           5.376e+03  5.749e+03   0.935 0.349899    
## GrLivArea:Neighborhood_Blmngtn      2.862e+05  4.150e+05   0.690 0.490542    
## GrLivArea:Neighborhood_Blueste     -9.503e+03  3.134e+04  -0.303 0.761779    
## GrLivArea:Neighborhood_BrDale      -5.585e+05  7.575e+05  -0.737 0.461126    
## GrLivArea:Neighborhood_ClearCr     -7.201e+03  5.337e+04  -0.135 0.892698    
## GrLivArea:Neighborhood_CollgCr     -1.441e+04  1.409e+04  -1.023 0.306756    
## GrLivArea:Neighborhood_Crawfor      1.144e+03  2.016e+04   0.057 0.954745    
## GrLivArea:Neighborhood_Edwards     -9.187e+03  1.820e+04  -0.505 0.613906    
## GrLivArea:Neighborhood_Gilbert     -4.772e+04  2.635e+04  -1.811 0.070457 .  
## GrLivArea:Neighborhood_IDOTRR      -6.499e+03  3.051e+04  -0.213 0.831326    
## GrLivArea:Neighborhood_MeadowV     -6.945e+04  9.501e+04  -0.731 0.464911    
## GrLivArea:Neighborhood_Mitchel     -3.968e+04  2.700e+04  -1.470 0.141886    
## GrLivArea:Neighborhood_NAmes       -2.999e+04  1.196e+04  -2.508 0.012282 *  
## GrLivArea:Neighborhood_NPkVill      1.208e+06  1.904e+06   0.634 0.525952    
## GrLivArea:Neighborhood_NridgHt      3.059e+04  3.484e+04   0.878 0.380150    
## GrLivArea:Neighborhood_NWAmes      -6.540e+03  2.210e+04  -0.296 0.767375    
## GrLivArea:Neighborhood_OldTown     -1.007e+04  1.295e+04  -0.777 0.437145    
## GrLivArea:Neighborhood_Sawyer      -3.628e+04  1.671e+04  -2.171 0.030101 *  
## GrLivArea:Neighborhood_SawyerW     -2.206e+04  1.700e+04  -1.297 0.194723    
## GrLivArea:Neighborhood_Somerst     -2.774e+04  3.198e+04  -0.867 0.385880    
## GrLivArea:Neighborhood_StoneBr     -1.128e+05  8.786e+04  -1.284 0.199400    
## GrLivArea:Neighborhood_SWISU       -2.820e+04  1.860e+04  -1.517 0.129629    
## GrLivArea:Neighborhood_Timber      -1.154e+04  3.183e+04  -0.363 0.716945    
## GrLivArea:Neighborhood_Veenker     -2.542e+05  1.815e+05  -1.401 0.161539    
## GrLivArea:SaleCondition_Abnorml     1.919e+04  2.074e+04   0.926 0.354883    
## GrLivArea:SaleCondition_Family      5.362e+04  4.210e+04   1.273 0.203107    
## GrLivArea:SaleCondition_Normal      2.806e+04  1.830e+04   1.534 0.125373    
## GrLivArea:HouseStyle_1.5Fin         1.785e+04  1.877e+04   0.951 0.341896    
## GrLivArea:HouseStyle_1.5Unf         3.587e+04  5.372e+04   0.668 0.504411    
## GrLivArea:HouseStyle_1Story         1.607e+04  1.706e+04   0.942 0.346311    
## GrLivArea:HouseStyle_2.5Unf         1.201e+04  7.953e+04   0.151 0.880030    
## GrLivArea:HouseStyle_2Story         2.303e+04  1.848e+04   1.246 0.212920    
## GrLivArea:HouseStyle_SFoyer         3.232e+03  5.260e+04   0.061 0.951014    
## GrLivArea:KitchenQual_Ex           -7.722e+03  1.493e+04  -0.517 0.605238    
## GrLivArea:KitchenQual_Fa           -2.886e+04  1.667e+04  -1.731 0.083643 .  
## GrLivArea:KitchenQual_Gd           -1.082e+04  8.327e+03  -1.300 0.193979    
## Neighborhood_Blmngtn:GrLivArea2    -3.293e+05  4.865e+05  -0.677 0.498583    
## Neighborhood_BrDale:GrLivArea2      7.595e+05  1.030e+06   0.737 0.461049    
## Neighborhood_ClearCr:GrLivArea2    -3.895e+02  5.098e+04  -0.008 0.993904    
## Neighborhood_CollgCr:GrLivArea2     6.781e+03  1.382e+04   0.491 0.623694    
## Neighborhood_Crawfor:GrLivArea2    -9.678e+02  1.775e+04  -0.055 0.956537    
## Neighborhood_Edwards:GrLivArea2    -1.493e+04  2.026e+04  -0.737 0.461317    
## Neighborhood_Gilbert:GrLivArea2     3.996e+04  2.410e+04   1.658 0.097560 .  
## Neighborhood_IDOTRR:GrLivArea2      4.530e+03  4.122e+04   0.110 0.912509    
## Neighborhood_MeadowV:GrLivArea2     8.962e+04  1.218e+05   0.736 0.462051    
## Neighborhood_Mitchel:GrLivArea2     3.331e+04  3.057e+04   1.090 0.276047    
## Neighborhood_NAmes:GrLivArea2       8.595e+03  1.182e+04   0.727 0.467426    
## Neighborhood_NPkVill:GrLivArea2    -1.374e+06  2.132e+06  -0.644 0.519573    
## Neighborhood_NridgHt:GrLivArea2    -2.761e+04  2.877e+04  -0.960 0.337415    
## Neighborhood_NWAmes:GrLivArea2      1.910e+03  1.910e+04   0.100 0.920361    
## Neighborhood_OldTown:GrLivArea2    -3.520e+03  1.248e+04  -0.282 0.778053    
## Neighborhood_Sawyer:GrLivArea2      1.883e+04  1.728e+04   1.089 0.276199    
## Neighborhood_SawyerW:GrLivArea2     1.756e+04  1.623e+04   1.082 0.279384    
## Neighborhood_Somerst:GrLivArea2     3.059e+04  2.950e+04   1.037 0.300013    
## Neighborhood_StoneBr:GrLivArea2     1.329e+05  9.014e+04   1.475 0.140554    
## Neighborhood_SWISU:GrLivArea2       1.609e+04  1.852e+04   0.869 0.385227    
## Neighborhood_Timber:GrLivArea2      2.317e+04  2.742e+04   0.845 0.398215    
## Neighborhood_Veenker:GrLivArea2     2.587e+05  1.778e+05   1.455 0.145843    
## SaleCondition_Abnorml:GrLivArea2   -3.281e+04  1.979e+04  -1.658 0.097594 .  
## SaleCondition_AdjLand:GrLivArea2    2.302e+04  7.877e+04   0.292 0.770181    
## SaleCondition_Family:GrLivArea2    -7.398e+04  3.885e+04  -1.904 0.057127 .  
## SaleCondition_Normal:GrLivArea2    -3.771e+04  1.706e+04  -2.211 0.027236 *  
## HouseStyle_1.5Fin:GrLivArea2       -9.695e+03  1.775e+04  -0.546 0.585105    
## HouseStyle_1.5Unf:GrLivArea2       -3.804e+04  5.729e+04  -0.664 0.506780    
## HouseStyle_1Story:GrLivArea2        2.321e+02  1.668e+04   0.014 0.988903    
## HouseStyle_2.5Unf:GrLivArea2       -2.163e+04  7.574e+04  -0.286 0.775244    
## HouseStyle_2Story:GrLivArea2       -1.749e+04  1.675e+04  -1.044 0.296660    
## HouseStyle_SFoyer:GrLivArea2        1.204e+04  7.146e+04   0.168 0.866235    
## KitchenQual_Ex:GrLivArea2           2.634e+04  1.409e+04   1.870 0.061791 .  
## KitchenQual_Fa:GrLivArea2           3.185e+04  2.011e+04   1.584 0.113535    
## KitchenQual_Gd:GrLivArea2           2.064e+04  8.476e+03   2.435 0.015052 *  
## Neighborhood_Blmngtn:LotArea       -3.331e+04  7.480e+04  -0.445 0.656128    
## Neighborhood_BrDale:LotArea        -6.522e+04  1.749e+05  -0.373 0.709241    
## Neighborhood_ClearCr:LotArea        9.406e+02  3.794e+03   0.248 0.804264    
## Neighborhood_CollgCr:LotArea        1.468e+03  5.395e+03   0.272 0.785582    
## Neighborhood_Crawfor:LotArea       -4.048e+03  4.842e+03  -0.836 0.403334    
## Neighborhood_Edwards:LotArea        8.569e+03  4.795e+03   1.787 0.074233 .  
## Neighborhood_Gilbert:LotArea       -8.838e+02  4.082e+03  -0.217 0.828631    
## Neighborhood_IDOTRR:LotArea         3.356e+03  7.084e+03   0.474 0.635737    
## Neighborhood_MeadowV:LotArea        1.061e+04  3.615e+04   0.293 0.769205    
## Neighborhood_Mitchel:LotArea       -7.017e+02  4.399e+03  -0.160 0.873279    
## Neighborhood_NAmes:LotArea          1.449e+03  4.290e+03   0.338 0.735579    
## Neighborhood_NPkVill:LotArea        5.910e+05  8.831e+05   0.669 0.503534    
## Neighborhood_NridgHt:LotArea        3.273e+04  6.840e+03   4.786 1.93e-06 ***
## Neighborhood_NWAmes:LotArea         1.377e+03  5.681e+03   0.242 0.808524    
## Neighborhood_OldTown:LotArea        3.862e+03  4.865e+03   0.794 0.427461    
## Neighborhood_Sawyer:LotArea        -4.267e+03  5.240e+03  -0.814 0.415594    
## Neighborhood_SawyerW:LotArea        2.194e+03  7.335e+03   0.299 0.764934    
## Neighborhood_Somerst:LotArea        1.254e+04  5.050e+03   2.483 0.013176 *  
## Neighborhood_StoneBr:LotArea        1.476e+04  9.658e+03   1.528 0.126807    
## Neighborhood_SWISU:LotArea          1.268e+04  1.662e+04   0.763 0.445758    
## Neighborhood_Timber:LotArea        -4.420e+03  4.779e+03  -0.925 0.355265    
## Neighborhood_Veenker:LotArea       -2.095e+04  1.662e+04  -1.260 0.207865    
## LotArea:SaleCondition_Abnorml      -5.308e+03  4.685e+03  -1.133 0.257425    
## LotArea:SaleCondition_Family       -1.399e+04  1.730e+04  -0.809 0.418674    
## LotArea:SaleCondition_Normal        8.645e+02  3.819e+03   0.226 0.820962    
## LotArea:HouseStyle_1.5Fin          -4.299e+03  5.321e+03  -0.808 0.419266    
## LotArea:HouseStyle_1.5Unf          -1.345e+04  1.782e+04  -0.755 0.450568    
## LotArea:HouseStyle_1Story          -7.154e+03  4.775e+03  -1.498 0.134333    
## LotArea:HouseStyle_2.5Unf           1.561e+04  2.405e+04   0.649 0.516342    
## LotArea:HouseStyle_2Story          -2.911e+03  4.972e+03  -0.585 0.558329    
## LotArea:HouseStyle_SFoyer          -8.470e+03  1.013e+04  -0.836 0.403147    
## Neighborhood_Blmngtn:BedroomAbvGr   1.362e+04  1.117e+04   1.220 0.222773    
## Neighborhood_BrDale:BedroomAbvGr    1.662e+04  1.864e+04   0.891 0.372916    
## Neighborhood_ClearCr:BedroomAbvGr  -7.049e+02  3.960e+03  -0.178 0.858757    
## Neighborhood_CollgCr:BedroomAbvGr   6.325e+03  3.778e+03   1.674 0.094345 .  
## Neighborhood_Crawfor:BedroomAbvGr  -3.979e+03  4.366e+03  -0.911 0.362297    
## Neighborhood_Edwards:BedroomAbvGr   5.811e+03  3.689e+03   1.575 0.115418    
## Neighborhood_Gilbert:BedroomAbvGr  -1.111e+03  5.117e+03  -0.217 0.828077    
## Neighborhood_IDOTRR:BedroomAbvGr    3.072e+03  6.150e+03   0.500 0.617515    
## Neighborhood_MeadowV:BedroomAbvGr   6.549e+03  1.573e+04   0.416 0.677128    
## Neighborhood_Mitchel:BedroomAbvGr  -1.050e+03  3.866e+03  -0.272 0.786010    
## Neighborhood_NAmes:BedroomAbvGr     7.388e+03  3.253e+03   2.271 0.023341 *  
## Neighborhood_NPkVill:BedroomAbvGr   5.876e+04  7.517e+04   0.782 0.434529    
## Neighborhood_NridgHt:BedroomAbvGr  -1.149e+04  5.114e+03  -2.247 0.024829 *  
## Neighborhood_NWAmes:BedroomAbvGr   -2.518e+03  4.753e+03  -0.530 0.596403    
## Neighborhood_OldTown:BedroomAbvGr   5.832e+02  3.510e+03   0.166 0.868061    
## Neighborhood_Sawyer:BedroomAbvGr    6.880e+03  4.000e+03   1.720 0.085745 .  
## Neighborhood_SawyerW:BedroomAbvGr   1.661e+03  4.811e+03   0.345 0.729911    
## Neighborhood_Somerst:BedroomAbvGr   4.245e+03  4.628e+03   0.917 0.359107    
## Neighborhood_StoneBr:BedroomAbvGr   4.296e+03  6.456e+03   0.665 0.505949    
## Neighborhood_SWISU:BedroomAbvGr     8.501e+03  5.311e+03   1.601 0.109724    
## Neighborhood_Timber:BedroomAbvGr   -9.139e+03  5.513e+03  -1.658 0.097620 .  
## Neighborhood_Veenker:BedroomAbvGr  -2.320e+04  1.112e+04  -2.087 0.037128 *  
## SaleCondition_Abnorml:BedroomAbvGr  4.277e+03  3.322e+03   1.287 0.198226    
## SaleCondition_Family:BedroomAbvGr   4.034e+03  8.835e+03   0.457 0.648034    
## SaleCondition_Normal:BedroomAbvGr   4.829e+03  2.611e+03   1.850 0.064637 .  
## HouseStyle_1.5Fin:BedroomAbvGr      5.707e+03  4.243e+03   1.345 0.178923    
## HouseStyle_1.5Unf:BedroomAbvGr      1.248e+04  1.102e+04   1.132 0.257680    
## HouseStyle_1Story:BedroomAbvGr      5.172e+03  3.835e+03   1.349 0.177690    
## HouseStyle_2.5Unf:BedroomAbvGr      8.657e+03  6.352e+03   1.363 0.173198    
## HouseStyle_2Story:BedroomAbvGr      6.116e+03  4.090e+03   1.495 0.135112    
## HouseStyle_SFoyer:BedroomAbvGr      7.654e+03  4.860e+03   1.575 0.115531    
## KitchenQual_Ex:BedroomAbvGr        -7.381e+03  3.458e+03  -2.134 0.033019 *  
## KitchenQual_Fa:BedroomAbvGr        -1.309e+03  4.498e+03  -0.291 0.771110    
## KitchenQual_Gd:BedroomAbvGr        -2.074e+03  1.801e+03  -1.152 0.249558    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 16150 on 1146 degrees of freedom
## Multiple R-squared:  0.9446, Adjusted R-squared:  0.9355 
## F-statistic: 103.4 on 189 and 1146 DF,  p-value: < 2.2e-16
ols_press(lm_fit_custom2)
## [1] Inf
custom_fit2 = ols_step_forward_p(lm_fit_custom2, penter=0.05, details = F)
custom_fit2
## 
##                                             Selection Summary                                              
## ----------------------------------------------------------------------------------------------------------
##         Variable                                           Adj.                                               
## Step                 Entered                 R-Square    R-Square      C(p)          AIC           RMSE       
## ----------------------------------------------------------------------------------------------------------
##    1    OverallQual                            0.6536      0.6533    5836.2226    31933.3094    37445.9512    
##    2    GrLivArea2                             0.7524      0.7521    3792.8640    31486.4881    31667.8353    
##    3    X1stFlrSF                              0.7955      0.7950    2904.6597    31233.4683    28795.9627    
##    4    GarageCars                             0.8176      0.8171    2447.5317    31082.0699    27199.5686    
##    5    BsmtFullBath                           0.8339      0.8333    2112.2990    30958.9984    25965.4999    
##    6    KitchenQual_Ex                         0.8476      0.8469    1831.8469    30846.4069    24884.8399    
##    7    YearRemodAdd                           0.8596      0.8588    1585.6912    30738.9195    23894.7630    
##    8    Neighborhood_OldTown                   0.8681      0.8673    1411.2375    30657.2204    23166.5971    
##    9    LotArea                                0.8753      0.8744    1264.6880    30584.4495    22535.8024    
##   10    GrLivArea:KitchenQual_Gd               0.8812      0.8803    1143.9057    30521.3243    22001.4703    
##   11    Neighborhood_Crawfor                   0.8839      0.8830    1089.7890    30492.4684    21757.0734    
##   12    Neighborhood_NridgHt                   0.8879      0.8868    1010.6322    30448.5445    21394.4081    
##   13    SaleCondition_Abnorml                  0.8911      0.8900     946.0023    30411.6238    21093.0066    
##   14    Neighborhood_Somerst                   0.8938      0.8927     890.8850    30379.3327    20831.9198    
##   15    HalfBath                               0.8953      0.8941     862.1021    30362.4802    20693.2896    
##   16    Neighborhood_Edwards                   0.8966      0.8954     837.4274    30347.9258    20573.2746    
##   17    SaleCondition_Normal                   0.8981      0.8968     809.2129    30330.9233    20435.2304    
##   18    SaleCondition_Alloca                   0.8997      0.8984     776.9276    30311.0281    20276.1559    
##   19    BsmtHalfBath                           0.9001      0.8986     771.5464    30308.2671    20247.7480    
##   20    FullBath                               0.9003      0.8988     768.7382    30307.1565    20231.8789    
##   21    Neighborhood_ClearCr                   0.9004      0.8988     768.2956    30307.5736    20227.5893    
##   22    Neighborhood_MeadowV                   0.9006      0.8989     767.1505    30307.5326    20219.8397    
##   23    Neighborhood_SawyerW                   0.9007      0.8990     766.0672    30307.5286    20212.3796    
##   24    Neighborhood_Mitchel                   0.9011      0.8992     761.4467    30305.2156    20187.4748    
##   25    Neighborhood_BrDale                    0.9015      0.8996     754.5097    30301.3712    20151.0546    
##   26    SaleCondition_Family                   0.9025      0.9006     735.2627    30289.3733    20053.4200    
##   27    SaleCondition_AdjLand                  0.9027      0.9007     733.6002    30288.9455    20042.8645    
##   28    Neighborhood_IDOTRR                    0.9030      0.9009     729.8203    30287.1051    20021.7330    
##   29    YrSold                                 0.9030      0.9009     730.7961    30288.4234    20024.2877    
##   30    Neighborhood_NPkVill                   0.9031      0.9009     731.4558    30289.5308    20025.2675    
##   31    HouseStyle_SFoyer                      0.9032      0.9008     732.0589    30290.5999    20025.9664    
##   32    Neighborhood_Timber                    0.9033      0.9009     731.2804    30290.7464    20019.7572    
##   33    KitchenQual_Fa                         0.9033      0.9009     732.8755    30292.4760    20025.4178    
##   34    Neighborhood_Sawyer                    0.9036      0.9011     728.7468    30290.3776    20002.4080    
##   35    HouseStyle_2Story                      0.9036      0.9010     730.7196    30292.3593    20009.9632    
##   36    Neighborhood_Blueste                   0.9037      0.9010     731.1612    30293.3152    20009.8428    
##   37    Fireplaces                             0.9046      0.9019     714.3960    30282.6774    19923.0958    
##   38    Neighborhood_Blmngtn                   0.9047      0.9019     713.8537    30282.9560    19917.9390    
##   39    Neighborhood_CollgCr                   0.9051      0.9023     706.9743    30278.9264    19880.7081    
##   40    Neighborhood_Gilbert                   0.9052      0.9023     707.6891    30280.0514    19881.8708    
##   41    Neighborhood_Veenker                   0.9055      0.9025     703.0922    30277.5510    19856.0805    
##   42    Neighborhood_StoneBr                   0.9073      0.9043     668.1618    30254.0734    19675.2563    
##   43    HouseStyle_1.5Unf                      0.9073      0.9043     669.3556    30255.5118    19678.7323    
##   44    Remodel                                0.9074      0.9043     669.2008    30256.0095    19675.2872    
##   45    Neighborhood_SWISU                     0.9077      0.9045     665.8125    30254.2455    19655.2040    
##   46    HouseStyle_1.5Fin                      0.9077      0.9045     666.9986    30255.6760    19658.6364    
##   47    BedroomAbvGr                           0.9085      0.9051     654.1205    30247.2229    19589.4802    
##   48    HouseStyle_1Story                      0.9088      0.9054     648.4680    30243.8143    19557.4615    
##   49    HouseStyle_2.5Unf                      0.9089      0.9054     648.8710    30244.6828    19556.7810    
##   50    X2ndFlrSF                              0.9089      0.9054     650.3705    30246.3280    19561.7915    
##   51    Neighborhood_NWAmes                    0.9091      0.9055     649.3173    30246.1616    19553.5472    
##   52    KitchenQual_Gd                         0.9095      0.9058     642.8260    30242.1179    19516.9714    
##   53    GrLivArea                              0.9102      0.9065     630.0221    30233.5154    19447.2619    
##   54    Neighborhood_NAmes                     0.9127      0.9090     580.4703    30197.9234    19183.0600    
##   55    Neighborhood_NAmes:GrLivArea2          0.9181      0.9146     470.5746    30114.4955    18586.7048    
##   56    Neighborhood_NoRidge                   0.9204      0.9169     425.5228    30078.8752    18334.0111    
##   57    Neighborhood_OldTown:GrLivArea2        0.9235      0.9201     362.1164    30026.7547    17973.4246    
##   58    KitchenQual_Ex:GrLivArea2              0.9260      0.9226     314.1199    29985.8542    17694.0795    
##   59    Neighborhood_NridgHt:LotArea           0.9275      0.9241     284.4487    29959.9476    17517.1027    
##   60    Neighborhood_NridgHt:BedroomAbvGr      0.9291      0.9258     253.0695    29931.8912    17327.9542    
##   61    Neighborhood_Somerst:GrLivArea2        0.9306      0.9272     225.0315    29906.2529    17156.3727    
##   62    Neighborhood_StoneBr:GrLivArea2        0.9317      0.9284     203.2970    29886.0029    17020.7840    
##   63    HouseStyle_1Story:GrLivArea2           0.9326      0.9292     187.1569    29870.7439    16917.8436    
##   64    GrLivArea:Neighborhood_Sawyer          0.9335      0.9302     169.1008    29853.3988    16802.4083    
##   65    Neighborhood_Edwards:GrLivArea2        0.9346      0.9313     148.3741    29833.1339    16669.5398    
##   66    LotArea:SaleCondition_Abnorml          0.9352      0.9318     138.7972    29823.6479    16604.5757    
##   67    LotArea:HouseStyle_1Story              0.9359      0.9325     126.9576    29811.7861    16525.1699    
##   68    KitchenQual_Ex:BedroomAbvGr            0.9363      0.9328     121.1163    29805.8680    16482.7732    
##   69    KitchenQual_Gd:BedroomAbvGr            0.9366      0.9332     115.2516    29799.8788    16440.0529    
##   70    Neighborhood_Somerst:LotArea           0.9370      0.9335     110.3035    29794.7807    16402.9178    
##   71    Neighborhood_Edwards:LotArea           0.9373      0.9337     106.1518    29790.4646    16370.6619    
##   72    Neighborhood_Veenker:BedroomAbvGr      0.9375      0.9340     102.5315    29786.6679    16341.6511    
##   73    KitchenQual_Gd:GrLivArea2              0.9378      0.9342      98.6601    29782.5851    16310.9505    
##   74    Neighborhood_NAmes:BedroomAbvGr        0.9381      0.9345      94.4759    29778.1483    16278.1556    
##   75    SaleCondition_Family:BedroomAbvGr      0.9385      0.9348      89.5147    29772.8655    16240.2889    
##   76    Neighborhood_CollgCr:BedroomAbvGr      0.9388      0.9351      85.0707    29768.0881    16205.5806    
##   77    Neighborhood_StoneBr:LotArea           0.9391      0.9353      80.8765    29763.5410    16172.3452    
##   78    Neighborhood_Timber:GrLivArea2         0.9393      0.9356      77.7136    29760.0593    16145.6192    
##   79    Neighborhood_Timber:BedroomAbvGr       0.9395      0.9357      75.7240    29757.8078    16126.3660    
## ----------------------------------------------------------------------------------------------------------
custom_model2 = custom_fit2$model
ols_press(custom_model2)
## [1] 371652600928
formatC(ols_press(custom_model2), format = "e", digits = 6)
## [1] "3.716526e+11"
summary(custom_model2)
## 
## Call:
## lm(formula = paste(response, "~", paste(preds, collapse = " + ")), 
##     data = l)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -61413  -9540     16  10002  56407 
## 
## Coefficients:
##                                   Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                       180061.0     4100.4  43.913  < 2e-16 ***
## OverallQual                        14174.0      822.4  17.236  < 2e-16 ***
## GrLivArea2                          8447.6     4898.3   1.725 0.084848 .  
## X1stFlrSF                           7172.6     4089.6   1.754 0.079699 .  
## GarageCars                          5636.5      633.8   8.893  < 2e-16 ***
## BsmtFullBath                        6686.0      512.8  13.039  < 2e-16 ***
## KitchenQual_Ex                     19290.4     3537.0   5.454 5.93e-08 ***
## YearRemodAdd                        5196.5      716.3   7.254 7.04e-13 ***
## Neighborhood_OldTown              -18895.8     2805.8  -6.735 2.49e-11 ***
## LotArea                             7217.2     1161.9   6.212 7.11e-10 ***
## Neighborhood_Crawfor               15614.7     3575.4   4.367 1.36e-05 ***
## Neighborhood_NridgHt               20808.4     4129.2   5.039 5.36e-07 ***
## SaleCondition_Abnorml             -26070.2     2696.3  -9.669  < 2e-16 ***
## Neighborhood_Somerst               16247.3     4047.7   4.014 6.33e-05 ***
## HalfBath                            3313.8      723.3   4.581 5.08e-06 ***
## Neighborhood_Edwards              -18540.9     3281.8  -5.650 1.99e-08 ***
## SaleCondition_Normal              -13265.9     2028.4  -6.540 8.92e-11 ***
## SaleCondition_Alloca              -33961.3     6767.4  -5.018 5.96e-07 ***
## BsmtHalfBath                        2419.7      477.1   5.072 4.53e-07 ***
## FullBath                            2482.1      788.2   3.149 0.001676 ** 
## Neighborhood_ClearCr                4228.0     5028.6   0.841 0.400623    
## Neighborhood_MeadowV              -14855.4     5145.3  -2.887 0.003954 ** 
## Neighborhood_SawyerW               -4594.2     3596.4  -1.277 0.201682    
## Neighborhood_Mitchel               -3825.0     3545.5  -1.079 0.280864    
## Neighborhood_BrDale               -18329.5     5340.6  -3.432 0.000618 ***
## SaleCondition_Family              -11252.1     5447.2  -2.066 0.039063 *  
## SaleCondition_AdjLand             -17979.6     8764.8  -2.051 0.040441 *  
## Neighborhood_IDOTRR               -10260.2     3479.3  -2.949 0.003248 ** 
## YrSold                               235.2      463.5   0.508 0.611882    
## Neighborhood_NPkVill               -7863.3     6236.1  -1.261 0.207570    
## HouseStyle_SFoyer                  -1664.5     3817.4  -0.436 0.662888    
## Neighborhood_Timber                 4617.6     4459.9   1.035 0.300702    
## KitchenQual_Fa                     -4288.2     2977.7  -1.440 0.150079    
## Neighborhood_Sawyer               -11962.0     3583.9  -3.338 0.000869 ***
## HouseStyle_2Story                  -3404.3     3460.1  -0.984 0.325378    
## Neighborhood_Blueste              -16397.3    11912.4  -1.376 0.168916    
## Fireplaces                          3210.6      571.5   5.618 2.38e-08 ***
## Neighborhood_Blmngtn              -10357.9     5577.5  -1.857 0.063534 .  
## Neighborhood_CollgCr                5316.1     3161.4   1.682 0.092899 .  
## Neighborhood_Gilbert               -3047.0     3566.7  -0.854 0.393108    
## Neighborhood_Veenker                9623.2     7017.2   1.371 0.170503    
## Neighborhood_StoneBr               23784.4     7544.5   3.153 0.001657 ** 
## HouseStyle_1.5Unf                  -6994.6     5105.0  -1.370 0.170888    
## Remodel                             -546.5      578.4  -0.945 0.344930    
## Neighborhood_SWISU                -10911.0     4488.5  -2.431 0.015202 *  
## HouseStyle_1.5Fin                  -3077.9     3160.8  -0.974 0.330343    
## BedroomAbvGr                        -918.4      881.6  -1.042 0.297737    
## HouseStyle_1Story                   7200.1     2616.7   2.752 0.006016 ** 
## HouseStyle_2.5Unf                  -6409.4     6576.8  -0.975 0.329975    
## X2ndFlrSF                           4383.3     4848.0   0.904 0.366097    
## Neighborhood_NWAmes                -6110.1     3569.6  -1.712 0.087200 .  
## KitchenQual_Gd                      5978.6     1407.4   4.248 2.32e-05 ***
## GrLivArea                           1769.2     6899.2   0.256 0.797656    
## Neighborhood_NAmes                -10524.3     2840.2  -3.705 0.000220 ***
## Neighborhood_NoRidge               25442.8     4598.9   5.532 3.84e-08 ***
## GrLivArea:KitchenQual_Gd           -8067.2     6169.0  -1.308 0.191216    
## GrLivArea2:Neighborhood_NAmes     -15674.5     1804.4  -8.687  < 2e-16 ***
## GrLivArea2:Neighborhood_OldTown    -9531.7     1836.1  -5.191 2.43e-07 ***
## GrLivArea2:KitchenQual_Ex          20571.5     2752.4   7.474 1.45e-13 ***
## LotArea:Neighborhood_NridgHt       38100.7     5276.5   7.221 8.93e-13 ***
## Neighborhood_NridgHt:BedroomAbvGr -13202.8     3688.4  -3.580 0.000357 ***
## GrLivArea2:Neighborhood_Somerst    13097.5     3469.3   3.775 0.000167 ***
## GrLivArea2:Neighborhood_StoneBr    27445.6    10009.0   2.742 0.006192 ** 
## GrLivArea2:HouseStyle_1Story       10421.0     2072.9   5.027 5.70e-07 ***
## GrLivArea:Neighborhood_Sawyer     -11538.6     2726.9  -4.231 2.49e-05 ***
## GrLivArea2:Neighborhood_Edwards   -12972.4     3044.8  -4.260 2.19e-05 ***
## LotArea:SaleCondition_Abnorml      -8569.6     2245.3  -3.817 0.000142 ***
## LotArea:HouseStyle_1Story          -3701.0     1245.8  -2.971 0.003025 ** 
## KitchenQual_Ex:BedroomAbvGr        -8664.8     2657.8  -3.260 0.001143 ** 
## KitchenQual_Gd:BedroomAbvGr        -3980.8     1414.6  -2.814 0.004968 ** 
## LotArea:Neighborhood_Somerst       11208.0     3596.4   3.116 0.001872 ** 
## LotArea:Neighborhood_Edwards        8029.3     3219.4   2.494 0.012758 *  
## Neighborhood_Veenker:BedroomAbvGr -14446.0     6326.8  -2.283 0.022578 *  
## GrLivArea2:KitchenQual_Gd          18775.1     6080.5   3.088 0.002061 ** 
## BedroomAbvGr:Neighborhood_NAmes     4712.9     1606.0   2.935 0.003400 ** 
## SaleCondition_Family:BedroomAbvGr  -9880.3     3837.6  -2.575 0.010149 *  
## Neighborhood_CollgCr:BedroomAbvGr   5479.9     2044.1   2.681 0.007440 ** 
## LotArea:Neighborhood_StoneBr       19185.9     7868.4   2.438 0.014892 *  
## GrLivArea2:Neighborhood_Timber     13691.8     4525.2   3.026 0.002531 ** 
## Neighborhood_Timber:BedroomAbvGr   -9464.9     4730.5  -2.001 0.045628 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 16130 on 1256 degrees of freedom
## Multiple R-squared:  0.9395, Adjusted R-squared:  0.9357 
## F-statistic: 246.9 on 79 and 1256 DF,  p-value: < 2.2e-16
# confint(custom_model2)
 ols_plot_cooksd_bar(custom_model2)

# 
custom_model_outliers2 = ols_plot_cooksd_bar(custom_model2, print_plot=F)
custom_model_outliers2
## $plot

## 
## $outliers
##      observation cooks_distance
## 4              4    0.003643648
## 6              6    0.003587838
## 13            13    0.004403118
## 28            28    0.003633247
## 30            30    0.006085629
## 55            55    0.011827809
## 106          106    0.008729686
## 107          107    0.025081573
## 135          135    0.003199636
## 143          143    0.003851727
## 157          157    0.003427010
## 163          163    0.005342402
## 208          208    0.005416122
## 215          215    0.004111557
## 296          296    0.007335707
## 302          302    0.025748385
## 304          304    0.005178486
## 347          347    0.007461948
## 354          354    0.003480074
## 357          357    0.005660432
## 365          365    0.003003836
## 375          375    0.004144409
## 385          385    0.005654068
## 387          387    0.007004596
## 415          415    0.005070414
## 421          421    0.005584137
## 426          426    0.005195863
## 434          434    0.005039708
## 437          437    0.003328875
## 443          443    0.003479451
## 444          444    0.004387590
## 464          464    0.005269619
## 498          498    0.006101668
## 504          504    0.005273268
## 517          517    0.003020967
## 520          520    0.005052092
## 525          525    0.005609224
## 586          586    0.003610248
## 599          599    0.003943240
## 602          602    0.005148305
## 615          615    0.004240712
## 617          617    0.009237945
## 627          627    0.003814550
## 635          635    0.004143822
## 640          640    0.028062667
## 651          651    0.003338232
## 660          660    0.006730229
## 670          670    0.023576071
## 678          678    0.015481533
## 696          696    0.004305718
## 720          720    0.003062290
## 735          735    0.003610885
## 750          750    0.007151223
## 769          769    0.003547593
## 785          785    0.004362438
## 841          841    0.005628058
## 876          876    0.005277131
## 885          885    0.003905777
## 886          886    0.003659001
## 899          899    0.007459304
## 902          902    0.003322375
## 931          931    0.003717174
## 940          940    0.004501775
## 945          945    0.003051807
## 949          949    0.003119406
## 951          951    0.003749618
## 975          975    0.003448606
## 1000        1000    0.022828208
## 1003        1003    0.003604551
## 1029        1029    0.003426416
## 1032        1032    0.004873331
## 1046        1046    0.003350563
## 1057        1057    0.003274681
## 1063        1063    0.013500179
## 1064        1064    0.005346208
## 1078        1078    0.003693754
## 1116        1116    0.003350363
## 1119        1119    0.006219010
## 1123        1123    0.005180857
## 1132        1132    0.003697648
## 1136        1136    0.009797816
## 1137        1137    0.003820943
## 1143        1143    0.003459681
## 1146        1146    0.009145719
## 1172        1172    0.003102799
## 1203        1203    0.003537340
## 1228        1228    0.003511612
## 1233        1233    0.003295877
## 1239        1239    0.003302947
## 1244        1244    0.008082494
## 1264        1264    0.003604696
## 1266        1266    0.005156878
## 1269        1269    0.003330920
## 1276        1276    0.008964431
## 1283        1283    0.009249292
## 1310        1310    0.004276788
## 
## $threshold
## [1] 0.002994012
# 
ols_plot_dffits(custom_model2)

ols_plot_diagnostics(custom_model2)

# 
ols_plot_resid_fit(custom_model2)

ols_plot_resid_pot(custom_model2)

ols_pred_rsq(custom_model2)
## [1] 0.9311714
plot(custom_fit2)

# custom_model_outliers2$outliers$observation
custom_predictions2 = c(predict(custom_model2, newdata = one_encode_custom_test_data2))
# 
# 
custom_predictions2 = data.frame(Id= one_encode_custom_test_data2$Id, SalePrice=custom_predictions2)
custom_predictions2
##        Id SalePrice
## 1    1461 111608.47
## 2    1462 148350.77
## 3    1463 165570.64
## 4    1464 177556.26
## 5    1465 179096.08
## 6    1466 169536.44
## 7    1467 166303.09
## 8    1468 163475.89
## 9    1469 198422.86
## 10   1470 121317.28
## 11   1471 188743.18
## 12   1472  98980.87
## 13   1473  90226.32
## 14   1474 147943.23
## 15   1475 119149.98
## 16   1476 372047.38
## 17   1477 269225.07
## 18   1478 293441.99
## 19   1479 316766.51
## 20   1480 485543.39
## 21   1481 327626.15
## 22   1482 218925.02
## 23   1483 168826.31
## 24   1484 156225.88
## 25   1485 196449.24
## 26   1486 195051.19
## 27   1487 311672.87
## 28   1488 245799.62
## 29   1489 196287.11
## 30   1490 219357.28
## 31   1491 188003.97
## 32   1492 106975.62
## 33   1493 167184.67
## 34   1494 302445.11
## 35   1495 289826.59
## 36   1496 216350.30
## 37   1497 197716.80
## 38   1498 156482.43
## 39   1499 166447.06
## 40   1500 159072.08
## 41   1501 181563.86
## 42   1502 145402.67
## 43   1503 272495.92
## 44   1504 250040.20
## 45   1505 219221.07
## 46   1506 196754.11
## 47   1507 251810.36
## 48   1508 198157.29
## 49   1509 158231.35
## 50   1510 153989.22
## 51   1511 146870.15
## 52   1512 164948.86
## 53   1513 147688.80
## 54   1514 172181.52
## 55   1515 154986.42
## 56   1516 153417.67
## 57   1517 160527.18
## 58   1518 152918.44
## 59   1519 193496.39
## 60   1520 134210.60
## 61   1521 124785.39
## 62   1522 184650.20
## 63   1523 103014.56
## 64   1524 120176.14
## 65   1525 116841.98
## 66   1526 109095.38
## 67   1527 126436.34
## 68   1528 147908.72
## 69   1529 136424.60
## 70   1530 167006.44
## 71   1531 113039.69
## 72   1532 105494.51
## 73   1533 145978.53
## 74   1534 115654.99
## 75   1535 136569.07
## 76   1536 103729.25
## 77   1537  67143.65
## 78   1538 147842.84
## 79   1539 205339.70
## 80   1540  94107.25
## 81   1541 141624.74
## 82   1542 141100.04
## 83   1543 207397.50
## 84   1544  98773.56
## 85   1545 121734.34
## 86   1546 153974.91
## 87   1547 136917.12
## 88   1548 131345.84
## 89   1549 117149.21
## 90   1550 136037.21
## 91   1551 130167.92
## 92   1552 114906.14
## 93   1553 136947.47
## 94   1554 122580.61
## 95   1555 176975.71
## 96   1556 130196.53
## 97   1557 117255.09
## 98   1558  97703.37
## 99   1559 100250.95
## 100  1560 145302.22
## 101  1561 157308.72
## 102  1562 128696.87
## 103  1563 124968.30
## 104  1564 151357.58
## 105  1565 137926.92
## 106  1566 223259.54
## 107  1567 101862.05
## 108  1568 224891.49
## 109  1569 134647.50
## 110  1570 144394.18
## 111  1571 104301.04
## 112  1572 133607.17
## 113  1573 235108.53
## 114  1574 133560.19
## 115  1575 216274.80
## 116  1576 216536.52
## 117  1577 174916.24
## 118  1578 155609.50
## 119  1579 144788.36
## 120  1580 192651.60
## 121  1581 154211.37
## 122  1582 135849.43
## 123  1583 288895.14
## 124  1584 232293.83
## 125  1585 144827.99
## 126  1586  83311.88
## 127  1587  91643.68
## 128  1588 129128.32
## 129  1589  84638.92
## 130  1590 134135.05
## 131  1591  79309.32
## 132  1592 131256.23
## 133  1593 128377.55
## 134  1594 145847.23
## 135  1595 128010.05
## 136  1596 224997.87
## 137  1597 199593.65
## 138  1598 234738.28
## 139  1599 169916.87
## 140  1600 165559.22
## 141  1601  47249.80
## 142  1602 116306.85
## 143  1603  64788.73
## 144  1604 261561.61
## 145  1605 240974.37
## 146  1606 165600.97
## 147  1607 210086.38
## 148  1608 204801.94
## 149  1609 195810.59
## 150  1610 152940.37
## 151  1611 157955.58
## 152  1612 159258.27
## 153  1613 157628.95
## 154  1614 124159.07
## 155  1615  74852.00
## 156  1616  75408.72
## 157  1617  83605.82
## 158  1618 111279.37
## 159  1619 131511.94
## 160  1620 197747.94
## 161  1621 135281.58
## 162  1622 127109.33
## 163  1623 264369.26
## 164  1624 205981.80
## 165  1625 121500.19
## 166  1626 181584.41
## 167  1627 171752.03
## 168  1628 253238.30
## 169  1629 183384.19
## 170  1630 441266.43
## 171  1631 221479.10
## 172  1632 270475.72
## 173  1633 175198.43
## 174  1634 181726.29
## 175  1635 179773.68
## 176  1636 153710.57
## 177  1637 182923.29
## 178  1638 191953.50
## 179  1639 182466.15
## 180  1640 269721.76
## 181  1641 188102.90
## 182  1642 264491.69
## 183  1643 239906.28
## 184  1644 237201.91
## 185  1645 183727.49
## 186  1646 158464.26
## 187  1647 161394.98
## 188  1648 134064.82
## 189  1649 141129.79
## 190  1650 116128.29
## 191  1651 120816.26
## 192  1652 112364.07
## 193  1653 112113.85
## 194  1654 147848.06
## 195  1655 158168.91
## 196  1656 145686.89
## 197  1657 158980.20
## 198  1658 145956.81
## 199  1659 129669.38
## 200  1660 155566.13
## 201  1661 422894.53
## 202  1662 420788.76
## 203  1663 354899.17
## 204  1664 532468.85
## 205  1665 299056.30
## 206  1666 330816.73
## 207  1667 381813.53
## 208  1668 303802.97
## 209  1669 312207.91
## 210  1670 335712.06
## 211  1671 274408.11
## 212  1672 453669.11
## 213  1673 298401.49
## 214  1674 242245.08
## 215  1675 194133.61
## 216  1676 213328.40
## 217  1677 243454.81
## 218  1678 469740.17
## 219  1679 396356.17
## 220  1680 333608.81
## 221  1681 250480.99
## 222  1682 317405.92
## 223  1683 182334.63
## 224  1684 180948.64
## 225  1685 168607.31
## 226  1686 165337.47
## 227  1687 177292.25
## 228  1688 187173.77
## 229  1689 188493.51
## 230  1690 193503.79
## 231  1691 183845.36
## 232  1692 244092.53
## 233  1693 173376.94
## 234  1694 178807.72
## 235  1695 174816.94
## 236  1696 264570.26
## 237  1697 175790.91
## 238  1698 342449.10
## 239  1699 313129.28
## 240  1700 259376.62
## 241  1701 287936.70
## 242  1702 254202.09
## 243  1703 258475.11
## 244  1704 270088.93
## 245  1705 214165.22
## 246  1706 460344.19
## 247  1707 208459.68
## 248  1708 194072.54
## 249  1709 252509.06
## 250  1710 217102.55
## 251  1711 263869.75
## 252  1712 274569.88
## 253  1713 271154.40
## 254  1714 222357.73
## 255  1715 216636.40
## 256  1716 166732.83
## 257  1717 172825.30
## 258  1718 134162.69
## 259  1719 196226.78
## 260  1720 206403.01
## 261  1721 160176.63
## 262  1722 123918.71
## 263  1723 149020.75
## 264  1724 208271.20
## 265  1725 229129.41
## 266  1726 172844.28
## 267  1727 162292.55
## 268  1728 186981.68
## 269  1729 153027.01
## 270  1730 170956.29
## 271  1731 133766.41
## 272  1732 129975.52
## 273  1733 110778.87
## 274  1734 119182.95
## 275  1735 125836.55
## 276  1736 120242.39
## 277  1737 314447.22
## 278  1738 241002.40
## 279  1739 378995.21
## 280  1740 240408.70
## 281  1741 189352.64
## 282  1742 181447.79
## 283  1743 182903.16
## 284  1744 296681.23
## 285  1745 245202.00
## 286  1746 208492.85
## 287  1747 222765.91
## 288  1748 245281.65
## 289  1749 156275.61
## 290  1750 132895.77
## 291  1751 241082.85
## 292  1752 119684.03
## 293  1753 151601.28
## 294  1754 188701.85
## 295  1755 170858.83
## 296  1756 123527.19
## 297  1757 112723.60
## 298  1758 150922.72
## 299  1759 172896.66
## 300  1760 167505.91
## 301  1761 152075.15
## 302  1762 142957.19
## 303  1763 171683.01
## 304  1764 123685.85
## 305  1765 168133.99
## 306  1766 174210.08
## 307  1767 201658.39
## 308  1768 133768.08
## 309  1769 175969.56
## 310  1770 150414.63
## 311  1771 121781.86
## 312  1772 139605.72
## 313  1773 135956.03
## 314  1774 162179.59
## 315  1775 141229.04
## 316  1776 123991.72
## 317  1777 111355.18
## 318  1778 137460.57
## 319  1779 124109.03
## 320  1780 180894.59
## 321  1781 121453.43
## 322  1782  71583.28
## 323  1783 132187.21
## 324  1784  97447.57
## 325  1785 103674.24
## 326  1786 147644.42
## 327  1787 153402.93
## 328  1788  56488.07
## 329  1789 103630.39
## 330  1790  89351.00
## 331  1791 175510.52
## 332  1792 148087.40
## 333  1793 158844.13
## 334  1794 153741.99
## 335  1795 131703.15
## 336  1796 132335.48
## 337  1797 119011.83
## 338  1798 117202.01
## 339  1799 114672.50
## 340  1800 133489.58
## 341  1801 124655.21
## 342  1802 127929.58
## 343  1803 145445.93
## 344  1804 137558.42
## 345  1805 148003.21
## 346  1806 118692.05
## 347  1807 145688.98
## 348  1808 135925.88
## 349  1809 112067.40
## 350  1810 119182.46
## 351  1811  86192.49
## 352  1812  95146.69
## 353  1813 107196.70
## 354  1814  90767.98
## 355  1815  52928.54
## 356  1816  92120.70
## 357  1817 108346.40
## 358  1818 168242.41
## 359  1819 141977.69
## 360  1820  76244.49
## 361  1821 105770.44
## 362  1822 139599.08
## 363  1823  48614.63
## 364  1824 150638.19
## 365  1825 140430.22
## 366  1826 105954.23
## 367  1827 113267.71
## 368  1828 131422.71
## 369  1829 157728.97
## 370  1830 129644.82
## 371  1831 150636.02
## 372  1832  97837.28
## 373  1833 153389.95
## 374  1834 121870.04
## 375  1835 135033.45
## 376  1836 125944.81
## 377  1837  87113.03
## 378  1838 142383.83
## 379  1839 108860.39
## 380  1840 141744.81
## 381  1841 148804.72
## 382  1842 116504.40
## 383  1843 113357.64
## 384  1844 150603.36
## 385  1845 131878.57
## 386  1846 158592.54
## 387  1847 194195.67
## 388  1848  58409.33
## 389  1849 128929.36
## 390  1850 121891.46
## 391  1851 133100.83
## 392  1852 121415.93
## 393  1853 123380.62
## 394  1854 179803.27
## 395  1855 179584.28
## 396  1856 217465.25
## 397  1857 187983.62
## 398  1858 139750.17
## 399  1859 133680.05
## 400  1860 156357.54
## 401  1861 132222.82
## 402  1862 293766.73
## 403  1863 288624.95
## 404  1864 288673.53
## 405  1865 306783.52
## 406  1866 285380.39
## 407  1867 219193.44
## 408  1868 265177.05
## 409  1869 196839.79
## 410  1870 210077.62
## 411  1871 221752.98
## 412  1872 177690.52
## 413  1873 224700.44
## 414  1874 140639.74
## 415  1875 206371.36
## 416  1876 198227.54
## 417  1877 204670.56
## 418  1878 202183.18
## 419  1879 123547.41
## 420  1880 132985.81
## 421  1881 229061.28
## 422  1882 255380.41
## 423  1883 198368.53
## 424  1884 212012.68
## 425  1885 228774.13
## 426  1886 258595.74
## 427  1887 205557.95
## 428  1888 244539.80
## 429  1889 175950.42
## 430  1890 117460.49
## 431  1891 134978.67
## 432  1892  84331.67
## 433  1893 134243.53
## 434  1894 126833.10
## 435  1895 136227.95
## 436  1896 108938.38
## 437  1897 108691.42
## 438  1898 117981.92
## 439  1899 172153.86
## 440  1900 160043.13
## 441  1901 183846.81
## 442  1902 148272.44
## 443  1903 222694.70
## 444  1904 165114.30
## 445  1905 205860.84
## 446  1906 179972.61
## 447  1907 238731.37
## 448  1908 110869.67
## 449  1909 142084.68
## 450  1910 123343.26
## 451  1911 224639.15
## 452  1912 363611.76
## 453  1913 166302.79
## 454  1914  70146.58
## 455  1915 298207.63
## 456  1916  67464.60
## 457  1917 236968.59
## 458  1918 141829.95
## 459  1919 174663.99
## 460  1920 165356.11
## 461  1921 342237.72
## 462  1922 273157.95
## 463  1923 259275.25
## 464  1924 223689.93
## 465  1925 222697.26
## 466  1926 356168.75
## 467  1927 109707.97
## 468  1928 161286.58
## 469  1929 114759.54
## 470  1930 142963.42
## 471  1931 137324.42
## 472  1932 135684.84
## 473  1933 146689.59
## 474  1934 168455.31
## 475  1935 160194.54
## 476  1936 165490.06
## 477  1937 178353.83
## 478  1938 169548.67
## 479  1939 269325.34
## 480  1940 179011.74
## 481  1941 173822.95
## 482  1942 194254.78
## 483  1943 207374.14
## 484  1944 416198.43
## 485  1945 381633.24
## 486  1946 178113.90
## 487  1947 310601.03
## 488  1948 194927.51
## 489  1949 248118.10
## 490  1950 174865.15
## 491  1951 264802.33
## 492  1952 223928.78
## 493  1953 164486.17
## 494  1954 195713.62
## 495  1955 128212.92
## 496  1956 314558.45
## 497  1957 166580.03
## 498  1958 271885.39
## 499  1959 149163.04
## 500  1960 102740.80
## 501  1961 135957.39
## 502  1962 109686.67
## 503  1963  99154.02
## 504  1964 102038.60
## 505  1965 138600.42
## 506  1966 142939.56
## 507  1967 284347.72
## 508  1968 397372.88
## 509  1969 390410.30
## 510  1970 379511.02
## 511  1971 411343.58
## 512  1972 362927.71
## 513  1973 231883.07
## 514  1974 306570.53
## 515  1975 514568.71
## 516  1976 283354.76
## 517  1977 363691.81
## 518  1978 355389.56
## 519  1979 360243.18
## 520  1980 246399.36
## 521  1981 336510.29
## 522  1982 221816.44
## 523  1983 208757.28
## 524  1984 167184.06
## 525  1985 205127.12
## 526  1986 215982.36
## 527  1987 181152.56
## 528  1988 171237.85
## 529  1989 191716.93
## 530  1990 205008.82
## 531  1991 233785.09
## 532  1992 190525.39
## 533  1993 173458.27
## 534  1994 212091.38
## 535  1995 181279.30
## 536  1996 267829.43
## 537  1997 309502.56
## 538  1998 310071.95
## 539  1999 265310.74
## 540  2000 301589.53
## 541  2001 272025.35
## 542  2002 251724.86
## 543  2003 257509.65
## 544  2004 280893.94
## 545  2005 218650.09
## 546  2006 213712.97
## 547  2007 252818.75
## 548  2008 203898.98
## 549  2009 189540.66
## 550  2010 187960.54
## 551  2011 144584.31
## 552  2012 160515.76
## 553  2013 166227.93
## 554  2014 181106.82
## 555  2015 187666.61
## 556  2016 185610.83
## 557  2017 195390.01
## 558  2018 130970.09
## 559  2019 132671.43
## 560  2020 124392.54
## 561  2021 100639.84
## 562  2022 198262.07
## 563  2023 135593.13
## 564  2024 303442.54
## 565  2025 349636.34
## 566  2026 174916.38
## 567  2027 158479.85
## 568  2028 162181.13
## 569  2029 170633.61
## 570  2030 277582.57
## 571  2031 226158.42
## 572  2032 248280.60
## 573  2033 263063.79
## 574  2034 175852.94
## 575  2035 232124.45
## 576  2036 203556.47
## 577  2037 204548.15
## 578  2038 374199.57
## 579  2039 256886.51
## 580  2040 367213.12
## 581  2041 267820.46
## 582  2042 211213.35
## 583  2043 162860.62
## 584  2044 171564.25
## 585  2045 188759.49
## 586  2046 156994.80
## 587  2047 135014.53
## 588  2048 145515.40
## 589  2049 170097.67
## 590  2050 167013.41
## 591  2051 111034.31
## 592  2052 129330.88
## 593  2053 141666.25
## 594  2054  84102.26
## 595  2055 148983.37
## 596  2056 157082.08
## 597  2057 115774.65
## 598  2058 184501.36
## 599  2059 145186.91
## 600  2060 160200.74
## 601  2061 173991.66
## 602  2062 132850.02
## 603  2063 122173.86
## 604  2064 134731.19
## 605  2065 119287.26
## 606  2066 178446.76
## 607  2067 167141.57
## 608  2068 167196.44
## 609  2069  86114.90
## 610  2070  95010.40
## 611  2071  88682.74
## 612  2072 147079.33
## 613  2073 151454.63
## 614  2074 178677.31
## 615  2075 153358.05
## 616  2076 109372.60
## 617  2077 143019.68
## 618  2078 128582.08
## 619  2079 133606.41
## 620  2080 126021.57
## 621  2081 127411.27
## 622  2082 143550.51
## 623  2083 129872.89
## 624  2084 115167.40
## 625  2085 120716.98
## 626  2086 131087.32
## 627  2087 122897.53
## 628  2088 107449.21
## 629  2089  85378.45
## 630  2090 120734.95
## 631  2091 103003.92
## 632  2092 116604.28
## 633  2093 149997.08
## 634  2094 143980.58
## 635  2095 137873.54
## 636  2096  94709.09
## 637  2097  91923.14
## 638  2098 123495.82
## 639  2099  38085.10
## 640  2100  92486.78
## 641  2101 128815.47
## 642  2102 120798.63
## 643  2103 109376.01
## 644  2104 132072.18
## 645  2105 116084.49
## 646  2106  74905.43
## 647  2107 169957.79
## 648  2108 111943.37
## 649  2109 106450.28
## 650  2110 129981.59
## 651  2111 154827.43
## 652  2112 139381.25
## 653  2113 119000.46
## 654  2114 138655.99
## 655  2115 164546.57
## 656  2116 131674.09
## 657  2117 144694.54
## 658  2118 134149.67
## 659  2119 109847.05
## 660  2120 134543.39
## 661  2121  85157.92
## 662  2122 104754.73
## 663  2123 111222.77
## 664  2124 177674.94
## 665  2125 118297.66
## 666  2126 171047.42
## 667  2127 129199.90
## 668  2128 108173.58
## 669  2129 106513.15
## 670  2130 116543.03
## 671  2131 150729.51
## 672  2132 127306.92
## 673  2133 129827.81
## 674  2134 132935.89
## 675  2135 133906.55
## 676  2136  82010.42
## 677  2137 108851.69
## 678  2138 119598.74
## 679  2139 161884.97
## 680  2140 132257.16
## 681  2141 150018.61
## 682  2142 116676.62
## 683  2143 139923.91
## 684  2144 115181.18
## 685  2145 130054.59
## 686  2146 159132.12
## 687  2147 183834.87
## 688  2148 154095.44
## 689  2149 128214.01
## 690  2150 217024.79
## 691  2151 114066.81
## 692  2152 168682.55
## 693  2153 145146.01
## 694  2154 113666.80
## 695  2155 128876.49
## 696  2156 279787.88
## 697  2157 220177.34
## 698  2158 226852.43
## 699  2159 222899.57
## 700  2160 197522.68
## 701  2161 231961.11
## 702  2162 351046.31
## 703  2163 316480.36
## 704  2164 217017.12
## 705  2165 201400.05
## 706  2166 148168.64
## 707  2167 205429.43
## 708  2168 208194.29
## 709  2169 192923.98
## 710  2170 221695.34
## 711  2171 155720.79
## 712  2172 134338.27
## 713  2173 184157.62
## 714  2174 241060.09
## 715  2175 266417.27
## 716  2176 263124.88
## 717  2177 255036.15
## 718  2178 219418.23
## 719  2179 144719.65
## 720  2180 202132.72
## 721  2181 192732.40
## 722  2182 212389.54
## 723  2183 186545.82
## 724  2184  98216.46
## 725  2185 136464.46
## 726  2186 148734.27
## 727  2187 151618.00
## 728  2188 137204.20
## 729  2189 525821.20
## 730  2190  85111.07
## 731  2191  91574.36
## 732  2192  87842.71
## 733  2193 143593.39
## 734  2194 106139.68
## 735  2195  92155.91
## 736  2196  84805.31
## 737  2197 100862.78
## 738  2198 154050.08
## 739  2199 182952.18
## 740  2200 158751.68
## 741  2201 165769.15
## 742  2202 205301.34
## 743  2203 162663.42
## 744  2204 190189.91
## 745  2205 133726.56
## 746  2206 157663.67
## 747  2207 186738.42
## 748  2208 269272.60
## 749  2209 224751.37
## 750  2210 110884.97
## 751  2211 130334.40
## 752  2212 118261.73
## 753  2213  90656.95
## 754  2214 134690.17
## 755  2215 105585.85
## 756  2216 136525.32
## 757  2217  31787.34
## 758  2218  91128.24
## 759  2219  93098.23
## 760  2220  79081.70
## 761  2221 298031.23
## 762  2222 272917.97
## 763  2223 272462.97
## 764  2224 208332.35
## 765  2225 150725.66
## 766  2226 178958.43
## 767  2227 222126.48
## 768  2228 229901.30
## 769  2229 256120.22
## 770  2230 155534.90
## 771  2231 216733.55
## 772  2232 181641.49
## 773  2233 162278.84
## 774  2234 216049.16
## 775  2235 213479.04
## 776  2236 252343.47
## 777  2237 298595.53
## 778  2238 186861.87
## 779  2239 106054.25
## 780  2240 162854.54
## 781  2241 141931.53
## 782  2242 108127.50
## 783  2243 113675.22
## 784  2244  97141.06
## 785  2245  97503.17
## 786  2246 135910.86
## 787  2247 109067.92
## 788  2248 115459.34
## 789  2249 104738.82
## 790  2250 118939.93
## 791  2251 188141.92
## 792  2252 167659.54
## 793  2253 163780.63
## 794  2254 176749.53
## 795  2255 174698.51
## 796  2256 174060.64
## 797  2257 197015.10
## 798  2258 159214.03
## 799  2259 167029.88
## 800  2260 139048.50
## 801  2261 174138.84
## 802  2262 203629.16
## 803  2263 444599.43
## 804  2264 607827.01
## 805  2265 196017.05
## 806  2266 291947.98
## 807  2267 407081.03
## 808  2268 419713.01
## 809  2269 150909.87
## 810  2270 178647.62
## 811  2271 213636.30
## 812  2272 211173.69
## 813  2273 144921.33
## 814  2274 178428.94
## 815  2275 163757.70
## 816  2276 174781.50
## 817  2277 182595.10
## 818  2278 157604.02
## 819  2279 119524.69
## 820  2280 104332.42
## 821  2281 163697.17
## 822  2282 179279.23
## 823  2283 101728.73
## 824  2284  99736.33
## 825  2285 135159.67
## 826  2286 130202.99
## 827  2287 340378.52
## 828  2288 279063.37
## 829  2289 388952.03
## 830  2290 432436.35
## 831  2291 354713.21
## 832  2292 432287.97
## 833  2293 465698.05
## 834  2294 385581.06
## 835  2295 503650.04
## 836  2296 335746.92
## 837  2297 321478.52
## 838  2298 328412.64
## 839  2299 366810.52
## 840  2300 339128.85
## 841  2301 312398.58
## 842  2302 240630.10
## 843  2303 249764.28
## 844  2304 262529.76
## 845  2305 217729.47
## 846  2306 204478.67
## 847  2307 201655.77
## 848  2308 214751.68
## 849  2309 286097.44
## 850  2310 221289.57
## 851  2311 193239.02
## 852  2312 185443.36
## 853  2313 172742.84
## 854  2314 183337.11
## 855  2315 182731.46
## 856  2316 218136.97
## 857  2317 177495.25
## 858  2318 177637.30
## 859  2319 184986.35
## 860  2320 181003.61
## 861  2321 227379.31
## 862  2322 183297.77
## 863  2323 186189.29
## 864  2324 192973.53
## 865  2325 216220.92
## 866  2326 181937.11
## 867  2327 201406.57
## 868  2328 205870.49
## 869  2329 187068.11
## 870  2330 171755.34
## 871  2331 329873.46
## 872  2332 388609.38
## 873  2333 322483.83
## 874  2334 277822.33
## 875  2335 277405.15
## 876  2336 301372.42
## 877  2337 206626.04
## 878  2338 267812.73
## 879  2339 229289.18
## 880  2340 395898.82
## 881  2341 247495.51
## 882  2342 232721.35
## 883  2343 220873.43
## 884  2344 250776.27
## 885  2345 246819.38
## 886  2346 210838.53
## 887  2347 199556.86
## 888  2348 244096.45
## 889  2349 194888.94
## 890  2350 313294.83
## 891  2351 275892.95
## 892  2352 265187.43
## 893  2353 300572.86
## 894  2354 145739.53
## 895  2355 144129.27
## 896  2356 142632.66
## 897  2357 184015.97
## 898  2358 184525.27
## 899  2359 142463.52
## 900  2360 126375.77
## 901  2361 141623.01
## 902  2362 292625.68
## 903  2363 139736.18
## 904  2364 148803.21
## 905  2365 214206.68
## 906  2366 197498.99
## 907  2367 241432.64
## 908  2368 211486.99
## 909  2369 237337.61
## 910  2370 172674.73
## 911  2371 163959.66
## 912  2372 182424.66
## 913  2373 279215.74
## 914  2374 320093.46
## 915  2375 274917.00
## 916  2376 312310.33
## 917  2377 369359.17
## 918  2378 156334.78
## 919  2379 206482.72
## 920  2380 143001.56
## 921  2381 164613.21
## 922  2382 195393.18
## 923  2383 201763.42
## 924  2384 230746.12
## 925  2385 155233.81
## 926  2386 134729.37
## 927  2387 137182.50
## 928  2388 130506.94
## 929  2389 127338.38
## 930  2390 147458.66
## 931  2391 128745.25
## 932  2392 113851.57
## 933  2393 174419.55
## 934  2394 144477.48
## 935  2395 165206.30
## 936  2396 157697.24
## 937  2397 203050.96
## 938  2398 125479.33
## 939  2399  72735.54
## 940  2400  66853.96
## 941  2401 110491.71
## 942  2402 128921.76
## 943  2403 161433.80
## 944  2404 152222.98
## 945  2405 160348.95
## 946  2406 143613.99
## 947  2407 123821.44
## 948  2408 136423.56
## 949  2409 126729.03
## 950  2410 180399.35
## 951  2411 122715.13
## 952  2412 139641.89
## 953  2413 136189.51
## 954  2414 143855.14
## 955  2415 150844.37
## 956  2416 128476.67
## 957  2417 137346.87
## 958  2418 132994.62
## 959  2419 116534.04
## 960  2420 136698.52
## 961  2421 143325.46
## 962  2422 102834.60
## 963  2423 111308.46
## 964  2424 145534.12
## 965  2425 222160.31
## 966  2426 115245.86
## 967  2427 119098.96
## 968  2428 182493.59
## 969  2429 113326.66
## 970  2430 141215.48
## 971  2431 132491.52
## 972  2432 136634.86
## 973  2433 136436.36
## 974  2434 143434.51
## 975  2435 151440.87
## 976  2436 113936.09
## 977  2437 107182.91
## 978  2438 132199.97
## 979  2439 112178.41
## 980  2440 114414.16
## 981  2441 111664.51
## 982  2442 109944.18
## 983  2443 119450.29
## 984  2444 127550.58
## 985  2445  81831.42
## 986  2446 116535.88
## 987  2447 181805.11
## 988  2448 124384.85
## 989  2449  97920.84
## 990  2450 138003.91
## 991  2451 130871.76
## 992  2452 169264.78
## 993  2453  90074.77
## 994  2454 127525.37
## 995  2455 140602.08
## 996  2456 133008.59
## 997  2457 125350.82
## 998  2458 133373.83
## 999  2459  96785.37
## 1000 2460 157687.63
## 1001 2461 124379.46
## 1002 2462 132131.61
## 1003 2463 137355.59
## 1004 2464 144091.59
## 1005 2465 135240.78
## 1006 2466 109062.80
## 1007 2467 158481.82
## 1008 2468  94583.77
## 1009 2469  91969.87
## 1010 2470 190651.18
## 1011 2471 190468.41
## 1012 2472 170503.28
## 1013 2473 111785.04
## 1014 2474  90833.83
## 1015 2475 191928.38
## 1016 2476 117836.75
## 1017 2477 129130.96
## 1018 2478 152539.12
## 1019 2479 126619.87
## 1020 2480 158351.30
## 1021 2481 129495.91
## 1022 2482 137026.12
## 1023 2483 111454.56
## 1024 2484 134087.99
## 1025 2485 119564.58
## 1026 2486 153628.93
## 1027 2487 172915.13
## 1028 2488 160116.07
## 1029 2489 153741.73
## 1030 2490 151944.07
## 1031 2491 105392.09
## 1032 2492 183030.23
## 1033 2493 161874.58
## 1034 2494 171997.95
## 1035 2495 118235.39
## 1036 2496 293773.82
## 1037 2497 133870.14
## 1038 2498 102329.88
## 1039 2499 100278.97
## 1040 2500 107039.30
## 1041 2501 126766.36
## 1042 2502 137741.80
## 1043 2503  90902.74
## 1044 2504 193078.00
## 1045 2505 222257.48
## 1046 2506 248324.46
## 1047 2507 302272.98
## 1048 2508 249000.61
## 1049 2509 209694.56
## 1050 2510 213113.94
## 1051 2511 175732.71
## 1052 2512 203568.66
## 1053 2513 212691.60
## 1054 2514 280942.14
## 1055 2515 150015.35
## 1056 2516 176917.15
## 1057 2517 139436.79
## 1058 2518 157423.97
## 1059 2519 216418.33
## 1060 2520 211131.31
## 1061 2521 196685.42
## 1062 2522 224972.06
## 1063 2523 126367.42
## 1064 2524 142717.89
## 1065 2525 143761.97
## 1066 2526 139408.30
## 1067 2527 136023.37
## 1068 2528 124561.81
## 1069 2529 135335.45
## 1070 2530 113924.26
## 1071 2531 231306.41
## 1072 2532 231911.56
## 1073 2533 197702.05
## 1074 2534 219504.72
## 1075 2535 294765.77
## 1076 2536 250950.70
## 1077 2537 216226.18
## 1078 2538 196216.26
## 1079 2539 184819.56
## 1080 2540 189589.25
## 1081 2541 188904.24
## 1082 2542 165527.12
## 1083 2543 114145.85
## 1084 2544 104959.56
## 1085 2545 147421.42
## 1086 2546 128904.77
## 1087 2547 140555.88
## 1088 2548 132397.63
## 1089 2549 140155.38
## 1090 2550 889465.39
## 1091 2551 137485.44
## 1092 2552 116696.77
## 1093 2553  87187.42
## 1094 2554  91743.69
## 1095 2555 140314.23
## 1096 2556  89571.11
## 1097 2557 107021.38
## 1098 2558 174242.64
## 1099 2559 147469.72
## 1100 2560 161876.49
## 1101 2561 166700.94
## 1102 2562 146983.28
## 1103 2563 156875.17
## 1104 2564 197171.84
## 1105 2565 161377.03
## 1106 2566 163343.14
## 1107 2567 139589.69
## 1108 2568 212343.99
## 1109 2569 210621.43
## 1110 2570 111070.38
## 1111 2571 186066.60
## 1112 2572 156392.10
## 1113 2573 225177.76
## 1114 2574 382711.78
## 1115 2575 114764.35
## 1116 2576 122770.23
## 1117 2577 138631.04
## 1118 2578  87134.04
## 1119 2579  59882.73
## 1120 2580 138388.31
## 1121 2581 110337.84
## 1122 2582 113437.10
## 1123 2583 273947.90
## 1124 2584 176932.00
## 1125 2585 168746.40
## 1126 2586 213696.43
## 1127 2587 196178.54
## 1128 2588 143023.35
## 1129 2589 150364.95
## 1130 2590 227335.63
## 1131 2591 290604.86
## 1132 2592 228200.29
## 1133 2593 268017.11
## 1134 2594 171461.09
## 1135 2595 199396.96
## 1136 2596 304386.59
## 1137 2597 179569.79
## 1138 2598 282779.88
## 1139 2599 314952.62
## 1140 2600 199405.88
## 1141 2601 161658.15
## 1142 2602  82569.78
## 1143 2603  90285.79
## 1144 2604  74347.74
## 1145 2605  84077.50
## 1146 2606 148371.17
## 1147 2607 192287.70
## 1148 2608 218549.12
## 1149 2609 152433.00
## 1150 2610 105178.36
## 1151 2611 105561.35
## 1152 2612 156457.07
## 1153 2613 121068.77
## 1154 2614 120267.93
## 1155 2615 157075.34
## 1156 2616 148504.52
## 1157 2617 170334.23
## 1158 2618 162015.49
## 1159 2619 187209.93
## 1160 2620 176724.59
## 1161 2621 174912.09
## 1162 2622 175010.88
## 1163 2623 230405.24
## 1164 2624 278227.95
## 1165 2625 421949.99
## 1166 2626 164039.34
## 1167 2627 158945.11
## 1168 2628 559214.33
## 1169 2629 699119.23
## 1170 2630 405763.94
## 1171 2631 535195.48
## 1172 2632 532168.11
## 1173 2633 286529.05
## 1174 2634 416822.02
## 1175 2635 154984.74
## 1176 2636 182319.74
## 1177 2637 163393.37
## 1178 2638 313321.37
## 1179 2639 194543.41
## 1180 2640 138918.82
## 1181 2641 122322.85
## 1182 2642 178735.25
## 1183 2643 109990.83
## 1184 2644 114988.17
## 1185 2645  98865.43
## 1186 2646  97501.96
## 1187 2647 100612.77
## 1188 2648 148675.72
## 1189 2649 148771.48
## 1190 2650 147526.63
## 1191 2651 144684.24
## 1192 2652 414484.98
## 1193 2653 315256.70
## 1194 2654 247636.08
## 1195 2655 381490.53
## 1196 2656 330558.93
## 1197 2657 325975.26
## 1198 2658 338639.19
## 1199 2659 285147.50
## 1200 2660 334528.62
## 1201 2661 350627.01
## 1202 2662 369577.96
## 1203 2663 295352.72
## 1204 2664 269953.38
## 1205 2665 348862.44
## 1206 2666 275622.05
## 1207 2667 181090.94
## 1208 2668 189892.62
## 1209 2669 177420.19
## 1210 2670 273377.89
## 1211 2671 188364.27
## 1212 2672 203073.86
## 1213 2673 200984.46
## 1214 2674 204841.09
## 1215 2675 167363.77
## 1216 2676 186118.87
## 1217 2677 180639.31
## 1218 2678 259957.79
## 1219 2679 273290.35
## 1220 2680 294954.53
## 1221 2681 400510.18
## 1222 2682 321696.17
## 1223 2683 510951.25
## 1224 2684 310898.17
## 1225 2685 353717.92
## 1226 2686 280617.35
## 1227 2687 305121.26
## 1228 2688 234649.08
## 1229 2689 210769.47
## 1230 2690 456548.51
## 1231 2691 199011.96
## 1232 2692 132942.09
## 1233 2693 191096.82
## 1234 2694 148036.13
## 1235 2695 184412.75
## 1236 2696 177563.02
## 1237 2697 169249.37
## 1238 2698 186859.80
## 1239 2699 180077.72
## 1240 2700 154256.67
## 1241 2701 149869.65
## 1242 2702 133023.65
## 1243 2703 142882.06
## 1244 2704 141648.79
## 1245 2705 113037.11
## 1246 2706 111418.02
## 1247 2707 132633.21
## 1248 2708 123068.93
## 1249 2709 102502.23
## 1250 2710 117297.72
## 1251 2711 337945.30
## 1252 2712 363236.91
## 1253 2713 173513.28
## 1254 2714 153589.08
## 1255 2715 168981.79
## 1256 2716 151548.67
## 1257 2717 202982.15
## 1258 2718 221881.82
## 1259 2719 148855.10
## 1260 2720 174499.80
## 1261 2721 141682.68
## 1262 2722 148521.78
## 1263 2723 147201.80
## 1264 2724 129922.29
## 1265 2725 133574.17
## 1266 2726 136503.50
## 1267 2727 175965.24
## 1268 2728 177298.71
## 1269 2729 139397.06
## 1270 2730 138728.96
## 1271 2731 131818.85
## 1272 2732 115345.47
## 1273 2733 163021.92
## 1274 2734 162141.92
## 1275 2735 134724.35
## 1276 2736 130789.46
## 1277 2737 113375.30
## 1278 2738 154232.30
## 1279 2739 170048.73
## 1280 2740 132045.73
## 1281 2741 138751.94
## 1282 2742 157451.02
## 1283 2743 142262.26
## 1284 2744 157931.93
## 1285 2745 137099.39
## 1286 2746 137420.97
## 1287 2747 169182.85
## 1288 2748 125960.99
## 1289 2749 117656.66
## 1290 2750 140032.86
## 1291 2751 132457.08
## 1292 2752 199277.15
## 1293 2753 156476.37
## 1294 2754 199947.59
## 1295 2755 135240.02
## 1296 2756  81178.39
## 1297 2757  87405.91
## 1298 2758  84327.93
## 1299 2759 128117.44
## 1300 2760 101897.11
## 1301 2761 149832.32
## 1302 2762 146189.58
## 1303 2763 196042.98
## 1304 2764 175500.69
## 1305 2765 203475.17
## 1306 2766 117234.46
## 1307 2767 101188.96
## 1308 2768 135897.47
## 1309 2769 120487.36
## 1310 2770 160278.00
## 1311 2771 122783.56
## 1312 2772 120825.25
## 1313 2773 134410.96
## 1314 2774 121877.52
## 1315 2775  98825.49
## 1316 2776 147202.98
## 1317 2777 143679.20
## 1318 2778 114500.82
## 1319 2779 104352.85
## 1320 2780 101202.86
## 1321 2781  91617.82
## 1322 2782  83603.86
## 1323 2783  76405.10
## 1324 2784 118074.21
## 1325 2785 105099.23
## 1326 2786  73618.26
## 1327 2787 116571.69
## 1328 2788  65573.47
## 1329 2789 151763.93
## 1330 2790  90380.53
## 1331 2791 108164.57
## 1332 2792  55859.51
## 1333 2793 165606.35
## 1334 2794  89388.43
## 1335 2795 118804.53
## 1336 2796 102335.39
## 1337 2797 183275.19
## 1338 2798  93223.14
## 1339 2799 114227.24
## 1340 2800  71451.84
## 1341 2801 107092.17
## 1342 2802 133296.07
## 1343 2803 171441.28
## 1344 2804 152195.45
## 1345 2805 106692.28
## 1346 2806  90311.45
## 1347 2807 154510.30
## 1348 2808 140359.46
## 1349 2809 138584.33
## 1350 2810 116482.25
## 1351 2811 161194.09
## 1352 2812 153207.74
## 1353 2813 162849.41
## 1354 2814 161013.21
## 1355 2815 112850.81
## 1356 2816 231625.44
## 1357 2817 153173.88
## 1358 2818 136622.51
## 1359 2819 189463.01
## 1360 2820 124600.52
## 1361 2821 101999.53
## 1362 2822 178413.57
## 1363 2823 289480.56
## 1364 2824 151920.77
## 1365 2825 150481.27
## 1366 2826 125427.83
## 1367 2827 122554.42
## 1368 2828 262060.02
## 1369 2829 207180.55
## 1370 2830 236536.58
## 1371 2831 162757.47
## 1372 2832 253761.62
## 1373 2833 277736.39
## 1374 2834 220464.76
## 1375 2835 212444.77
## 1376 2836 190960.65
## 1377 2837 167599.59
## 1378 2838 149793.49
## 1379 2839 181555.69
## 1380 2840 199536.82
## 1381 2841 199462.83
## 1382 2842 225216.22
## 1383 2843 145820.72
## 1384 2844 179286.21
## 1385 2845 113614.40
## 1386 2846 202141.26
## 1387 2847 197356.19
## 1388 2848 215058.25
## 1389 2849 211118.02
## 1390 2850 274202.88
## 1391 2851 242941.06
## 1392 2852 240295.01
## 1393 2853 237026.00
## 1394 2854 144122.38
## 1395 2855 200053.99
## 1396 2856 212758.14
## 1397 2857 190630.08
## 1398 2858 208656.80
## 1399 2859 126326.51
## 1400 2860 128471.16
## 1401 2861 119202.61
## 1402 2862 164954.09
## 1403 2863 128222.79
## 1404 2864 201663.92
## 1405 2865 147715.41
## 1406 2866 142683.76
## 1407 2867  78629.45
## 1408 2868 115742.30
## 1409 2869  93757.14
## 1410 2870 131941.11
## 1411 2871  71395.84
## 1412 2872  54252.69
## 1413 2873 108171.96
## 1414 2874 129500.58
## 1415 2875 117128.71
## 1416 2876 164854.01
## 1417 2877 114113.59
## 1418 2878 159126.55
## 1419 2879 126577.22
## 1420 2880  97848.37
## 1421 2881 177831.08
## 1422 2882 163862.70
## 1423 2883 181777.80
## 1424 2884 215114.27
## 1425 2885 188293.67
## 1426 2886 214877.68
## 1427 2887 105479.20
## 1428 2888 130172.10
## 1429 2889  65024.28
## 1430 2890  66158.59
## 1431 2891 135054.52
## 1432 2892  42251.12
## 1433 2893  94710.50
## 1434 2894  62107.23
## 1435 2895 316608.50
## 1436 2896 260875.83
## 1437 2897 194744.67
## 1438 2898 174844.95
## 1439 2899 195701.92
## 1440 2900 161072.87
## 1441 2901 218856.74
## 1442 2902 200832.49
## 1443 2903 310849.86
## 1444 2904 318348.84
## 1445 2905 119477.67
## 1446 2906 206522.93
## 1447 2907 108050.93
## 1448 2908 125441.86
## 1449 2909 171084.71
## 1450 2910  74084.29
## 1451 2911  82367.12
## 1452 2912 153398.22
## 1453 2913  81934.04
## 1454 2914  74212.05
## 1455 2915  74750.38
## 1456 2916  81845.22
## 1457 2917 131482.84
## 1458 2918 120161.05
## 1459 2919 201171.92
#write_csv(custom_predictions2, "../kaggleData/customSelection4Predictions.csv")
custom2_vif = VIF(custom_model2)
c(custom2_vif)
##                       OverallQual                        GrLivArea2 
##                          3.471616                        123.169841 
##                         X1stFlrSF                        GarageCars 
##                         85.856934                          2.061982 
##                      BsmtFullBath                    KitchenQual_Ex 
##                          1.349743                          2.931247 
##                      YearRemodAdd              Neighborhood_OldTown 
##                          2.634081                          2.954159 
##                           LotArea              Neighborhood_Crawfor 
##                          6.929924                          1.953514 
##              Neighborhood_NridgHt             SaleCondition_Abnorml 
##                          3.517653                          2.394833 
##              Neighborhood_Somerst                          HalfBath 
##                          4.849040                          2.685854 
##              Neighborhood_Edwards              SaleCondition_Normal 
##                          3.547701                          2.843296 
##              SaleCondition_Alloca                      BsmtHalfBath 
##                          1.226257                          1.168521 
##                          FullBath              Neighborhood_ClearCr 
##                          3.188959                          1.821182 
##              Neighborhood_MeadowV              Neighborhood_SawyerW 
##                          1.609300                          2.485526 
##              Neighborhood_Mitchel               Neighborhood_BrDale 
##                          2.191920                          1.626622 
##              SaleCondition_Family             SaleCondition_AdjLand 
##                          1.580603                          1.178061 
##               Neighborhood_IDOTRR                            YrSold 
##                          1.630644                          1.102629 
##              Neighborhood_NPkVill                 HouseStyle_SFoyer 
##                          1.336790                          1.962913 
##               Neighborhood_Timber                    KitchenQual_Fa 
##                          2.388886                          1.194322 
##               Neighborhood_Sawyer                 HouseStyle_2Story 
##                          3.408459                         12.901620 
##              Neighborhood_Blueste                        Fireplaces 
##                          1.089696                          1.676710 
##              Neighborhood_Blmngtn              Neighborhood_CollgCr 
##                          1.657163                          5.057672 
##              Neighborhood_Gilbert              Neighborhood_Veenker 
##                          3.506208                          1.505699 
##              Neighborhood_StoneBr                 HouseStyle_1.5Unf 
##                          2.817651                          1.486317 
##                           Remodel                Neighborhood_SWISU 
##                          1.717401                          1.526221 
##                 HouseStyle_1.5Fin                      BedroomAbvGr 
##                          4.844936                          3.990139 
##                 HouseStyle_1Story                 HouseStyle_2.5Unf 
##                          8.793051                          1.486855 
##                         X2ndFlrSF               Neighborhood_NWAmes 
##                        120.653786                          3.074052 
##                    KitchenQual_Gd                         GrLivArea 
##                          2.438621                        244.347183 
##                Neighborhood_NAmes              Neighborhood_NoRidge 
##                          5.721107                          2.694788 
##          GrLivArea:KitchenQual_Gd     GrLivArea2:Neighborhood_NAmes 
##                         79.400379                          2.581348 
##   GrLivArea2:Neighborhood_OldTown         GrLivArea2:KitchenQual_Ex 
##                          1.491766                          3.408651 
##      LotArea:Neighborhood_NridgHt Neighborhood_NridgHt:BedroomAbvGr 
##                          2.118401                          2.532604 
##   GrLivArea2:Neighborhood_Somerst   GrLivArea2:Neighborhood_StoneBr 
##                          1.655127                          1.771494 
##      GrLivArea2:HouseStyle_1Story     GrLivArea:Neighborhood_Sawyer 
##                          5.915974                          1.824017 
##   GrLivArea2:Neighborhood_Edwards     LotArea:SaleCondition_Abnorml 
##                          1.913319                          1.229283 
##         LotArea:HouseStyle_1Story       KitchenQual_Ex:BedroomAbvGr 
##                          5.595836                          2.161286 
##       KitchenQual_Gd:BedroomAbvGr      LotArea:Neighborhood_Somerst 
##                          3.671369                          2.198587 
##      LotArea:Neighborhood_Edwards Neighborhood_Veenker:BedroomAbvGr 
##                          1.174082                          1.297198 
##         GrLivArea2:KitchenQual_Gd   BedroomAbvGr:Neighborhood_NAmes 
##                         90.488388                          2.189490 
## SaleCondition_Family:BedroomAbvGr Neighborhood_CollgCr:BedroomAbvGr 
##                          1.443542                          1.506937 
##      LotArea:Neighborhood_StoneBr    GrLivArea2:Neighborhood_Timber 
##                          1.787839                          2.747639 
##  Neighborhood_Timber:BedroomAbvGr 
##                          2.278182
#custom_model2$terms
#custom_fit3 = ols_step_both_p(lm_fit_custom2, penter=0.05, details = F)
# OverallQual        X1stFlrSF  HouseStyle_2Story  GrLivArea    KitchenQual_Gd:GrLivArea   GrLivArea2:KitchenQual_Gd   



lm_fit_custom3 = lm(SalePrice ~ OverallQual  + GarageCars + 
    BsmtFullBath + KitchenQual_Ex + YearRemodAdd + Neighborhood_OldTown + 
    LotArea + GrLivArea:KitchenQual_Gd + Neighborhood_Crawfor + 
    Neighborhood_NridgHt + SaleCondition_Abnorml + Neighborhood_Somerst + 
    HalfBath + Neighborhood_Edwards + SaleCondition_Normal + 
    SaleCondition_Alloca + BsmtHalfBath + FullBath + Neighborhood_ClearCr + 
    Neighborhood_MeadowV + Neighborhood_SawyerW + Neighborhood_Mitchel + 
    Neighborhood_BrDale + SaleCondition_Family + SaleCondition_AdjLand + 
    Neighborhood_IDOTRR + YrSold + Neighborhood_NPkVill + HouseStyle_SFoyer + 
    Neighborhood_Timber + KitchenQual_Fa + Neighborhood_Sawyer + 
     Neighborhood_Blueste + Fireplaces + Neighborhood_Blmngtn + 
    Neighborhood_CollgCr + Neighborhood_Gilbert + Neighborhood_Veenker + 
    Neighborhood_StoneBr + HouseStyle_1.5Unf + Remodel + Neighborhood_SWISU + 
    HouseStyle_1.5Fin + BedroomAbvGr + HouseStyle_1Story + HouseStyle_2.5Unf + 
     Neighborhood_NWAmes + KitchenQual_Gd +  
    Neighborhood_NAmes + Neighborhood_NAmes:GrLivArea2 + Neighborhood_NoRidge + 
    Neighborhood_OldTown:GrLivArea2  + 
    Neighborhood_NridgHt:LotArea + Neighborhood_NridgHt:BedroomAbvGr + 
    Neighborhood_Somerst:GrLivArea2 + Neighborhood_StoneBr:GrLivArea2 + 
    HouseStyle_1Story:GrLivArea2 + GrLivArea:Neighborhood_Sawyer + 
    Neighborhood_Edwards:GrLivArea2 + LotArea:SaleCondition_Abnorml + 
    LotArea:HouseStyle_1Story + KitchenQual_Ex:BedroomAbvGr + 
    KitchenQual_Gd:BedroomAbvGr + Neighborhood_Somerst:LotArea + 
    Neighborhood_Edwards:LotArea + Neighborhood_Veenker:BedroomAbvGr + 
     Neighborhood_NAmes:BedroomAbvGr + 
    SaleCondition_Family:BedroomAbvGr + Neighborhood_CollgCr:BedroomAbvGr + 
    Neighborhood_StoneBr:LotArea + Neighborhood_Timber:GrLivArea2 + 
    Neighborhood_Timber:BedroomAbvGr
                , data = one_encode_custom_train_data2)
summary(lm_fit_custom3)
## 
## Call:
## lm(formula = SalePrice ~ OverallQual + GarageCars + BsmtFullBath + 
##     KitchenQual_Ex + YearRemodAdd + Neighborhood_OldTown + LotArea + 
##     GrLivArea:KitchenQual_Gd + Neighborhood_Crawfor + Neighborhood_NridgHt + 
##     SaleCondition_Abnorml + Neighborhood_Somerst + HalfBath + 
##     Neighborhood_Edwards + SaleCondition_Normal + SaleCondition_Alloca + 
##     BsmtHalfBath + FullBath + Neighborhood_ClearCr + Neighborhood_MeadowV + 
##     Neighborhood_SawyerW + Neighborhood_Mitchel + Neighborhood_BrDale + 
##     SaleCondition_Family + SaleCondition_AdjLand + Neighborhood_IDOTRR + 
##     YrSold + Neighborhood_NPkVill + HouseStyle_SFoyer + Neighborhood_Timber + 
##     KitchenQual_Fa + Neighborhood_Sawyer + Neighborhood_Blueste + 
##     Fireplaces + Neighborhood_Blmngtn + Neighborhood_CollgCr + 
##     Neighborhood_Gilbert + Neighborhood_Veenker + Neighborhood_StoneBr + 
##     HouseStyle_1.5Unf + Remodel + Neighborhood_SWISU + HouseStyle_1.5Fin + 
##     BedroomAbvGr + HouseStyle_1Story + HouseStyle_2.5Unf + Neighborhood_NWAmes + 
##     KitchenQual_Gd + Neighborhood_NAmes + Neighborhood_NAmes:GrLivArea2 + 
##     Neighborhood_NoRidge + Neighborhood_OldTown:GrLivArea2 + 
##     Neighborhood_NridgHt:LotArea + Neighborhood_NridgHt:BedroomAbvGr + 
##     Neighborhood_Somerst:GrLivArea2 + Neighborhood_StoneBr:GrLivArea2 + 
##     HouseStyle_1Story:GrLivArea2 + GrLivArea:Neighborhood_Sawyer + 
##     Neighborhood_Edwards:GrLivArea2 + LotArea:SaleCondition_Abnorml + 
##     LotArea:HouseStyle_1Story + KitchenQual_Ex:BedroomAbvGr + 
##     KitchenQual_Gd:BedroomAbvGr + Neighborhood_Somerst:LotArea + 
##     Neighborhood_Edwards:LotArea + Neighborhood_Veenker:BedroomAbvGr + 
##     Neighborhood_NAmes:BedroomAbvGr + SaleCondition_Family:BedroomAbvGr + 
##     Neighborhood_CollgCr:BedroomAbvGr + Neighborhood_StoneBr:LotArea + 
##     Neighborhood_Timber:GrLivArea2 + Neighborhood_Timber:BedroomAbvGr, 
##     data = one_encode_custom_train_data2)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -61271 -10880    353  10543  92341 
## 
## Coefficients:
##                                   Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                       175076.7     3857.9  45.381  < 2e-16 ***
## OverallQual                        14948.1      923.3  16.189  < 2e-16 ***
## GarageCars                          6905.4      706.5   9.774  < 2e-16 ***
## BsmtFullBath                        7435.1      573.7  12.959  < 2e-16 ***
## KitchenQual_Ex                     47357.4     3301.5  14.344  < 2e-16 ***
## YearRemodAdd                        5099.1      806.6   6.322 3.57e-10 ***
## Neighborhood_OldTown              -14318.9     3111.1  -4.603 4.59e-06 ***
## LotArea                            10373.8     1275.7   8.132 1.00e-15 ***
## Neighborhood_Crawfor               21579.9     3989.7   5.409 7.58e-08 ***
## Neighborhood_NridgHt               25595.5     4629.3   5.529 3.91e-08 ***
## SaleCondition_Abnorml             -26984.7     3026.9  -8.915  < 2e-16 ***
## Neighborhood_Somerst               11970.5     4547.8   2.632 0.008588 ** 
## HalfBath                            4796.0      732.5   6.547 8.50e-11 ***
## Neighborhood_Edwards              -15556.0     3682.0  -4.225 2.56e-05 ***
## SaleCondition_Normal              -14083.0     2283.5  -6.167 9.34e-10 ***
## SaleCondition_Alloca              -31675.1     7581.9  -4.178 3.15e-05 ***
## BsmtHalfBath                        2208.9      536.9   4.114 4.14e-05 ***
## FullBath                            4368.5      835.2   5.231 1.97e-07 ***
## Neighborhood_ClearCr                9689.5     5625.1   1.723 0.085215 .  
## Neighborhood_MeadowV              -17812.4     5731.1  -3.108 0.001925 ** 
## Neighborhood_SawyerW               -3210.4     4049.9  -0.793 0.428101    
## Neighborhood_Mitchel               -3121.7     3974.5  -0.785 0.432347    
## Neighborhood_BrDale               -21992.3     5916.7  -3.717 0.000210 ***
## SaleCondition_Family              -11373.3     6143.2  -1.851 0.064352 .  
## SaleCondition_AdjLand             -23127.9     9873.9  -2.342 0.019318 *  
## Neighborhood_IDOTRR               -11358.1     3908.2  -2.906 0.003722 ** 
## YrSold                               322.1      521.8   0.617 0.537173    
## Neighborhood_NPkVill              -10657.0     7008.7  -1.521 0.128628    
## HouseStyle_SFoyer                  -5414.9     3806.2  -1.423 0.155091    
## Neighborhood_Timber                 2732.0     4974.0   0.549 0.582929    
## KitchenQual_Fa                     -4624.7     3360.2  -1.376 0.168972    
## Neighborhood_Sawyer                -7868.1     3998.2  -1.968 0.049295 *  
## Neighborhood_Blueste              -18338.2    13412.3  -1.367 0.171785    
## Fireplaces                          4209.9      629.3   6.690 3.34e-11 ***
## Neighborhood_Blmngtn              -11264.5     6272.3  -1.796 0.072746 .  
## Neighborhood_CollgCr                5234.8     3552.7   1.473 0.140878    
## Neighborhood_Gilbert               -4665.5     3982.7  -1.171 0.241644    
## Neighborhood_Veenker               10890.7     7849.3   1.387 0.165542    
## Neighborhood_StoneBr               27161.0     8499.6   3.196 0.001430 ** 
## HouseStyle_1.5Unf                  -5449.3     5169.3  -1.054 0.292008    
## Remodel                              234.6      645.2   0.364 0.716170    
## Neighborhood_SWISU                 -4406.1     4875.1  -0.904 0.366283    
## HouseStyle_1.5Fin                   -746.6     2183.6  -0.342 0.732480    
## BedroomAbvGr                        2099.7      903.9   2.323 0.020343 *  
## HouseStyle_1Story                  12335.1     1684.8   7.322 4.35e-13 ***
## HouseStyle_2.5Unf                  -1924.5     6446.5  -0.299 0.765349    
## Neighborhood_NWAmes                -1047.8     3976.4  -0.264 0.792196    
## KitchenQual_Gd                      6151.0     1561.5   3.939 8.63e-05 ***
## Neighborhood_NAmes                 -4974.0     3144.5  -1.582 0.113940    
## Neighborhood_NoRidge               44960.6     4986.6   9.016  < 2e-16 ***
## GrLivArea:KitchenQual_Gd           19658.9     1353.5  14.525  < 2e-16 ***
## Neighborhood_NAmes:GrLivArea2      -7281.4     1894.1  -3.844 0.000127 ***
## Neighborhood_OldTown:GrLivArea2     -419.4     1849.4  -0.227 0.820618    
## LotArea:Neighborhood_NridgHt       47929.5     5893.2   8.133 9.92e-16 ***
## Neighborhood_NridgHt:BedroomAbvGr -14385.6     4156.9  -3.461 0.000557 ***
## Neighborhood_Somerst:GrLivArea2    19300.5     3890.0   4.962 7.95e-07 ***
## Neighborhood_StoneBr:GrLivArea2    30206.5    11289.9   2.676 0.007557 ** 
## HouseStyle_1Story:GrLivArea2       19148.9     1592.4  12.025  < 2e-16 ***
## GrLivArea:Neighborhood_Sawyer      -5882.2     3009.0  -1.955 0.050821 .  
## Neighborhood_Edwards:GrLivArea2    -7615.5     3390.5  -2.246 0.024867 *  
## LotArea:SaleCondition_Abnorml      -5878.3     2506.9  -2.345 0.019186 *  
## LotArea:HouseStyle_1Story          -7505.1     1363.9  -5.503 4.53e-08 ***
## KitchenQual_Ex:BedroomAbvGr         2370.1     2642.9   0.897 0.369994    
## KitchenQual_Gd:BedroomAbvGr        -7146.9     1541.7  -4.636 3.93e-06 ***
## LotArea:Neighborhood_Somerst        9262.2     4029.4   2.299 0.021689 *  
## LotArea:Neighborhood_Edwards        6825.8     3625.5   1.883 0.059967 .  
## Neighborhood_Veenker:BedroomAbvGr -11119.2     7134.5  -1.559 0.119359    
## BedroomAbvGr:Neighborhood_NAmes     2098.2     1784.6   1.176 0.239926    
## SaleCondition_Family:BedroomAbvGr  -9495.5     4323.2  -2.196 0.028243 *  
## Neighborhood_CollgCr:BedroomAbvGr   4686.5     2242.6   2.090 0.036842 *  
## LotArea:Neighborhood_StoneBr       18481.1     8874.8   2.082 0.037505 *  
## Neighborhood_Timber:GrLivArea2     22402.3     5029.9   4.454 9.18e-06 ***
## Neighborhood_Timber:BedroomAbvGr  -14039.6     5312.2  -2.643 0.008322 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 18200 on 1263 degrees of freedom
## Multiple R-squared:  0.9225, Adjusted R-squared:  0.9181 
## F-statistic: 208.8 on 72 and 1263 DF,  p-value: < 2.2e-16
formatC(ols_press(lm_fit_custom3), format = "e", digits = 6)
## [1] "4.778566e+11"
 ols_plot_cooksd_bar(lm_fit_custom3)

# 
custom_model_outliers3 = ols_plot_cooksd_bar(lm_fit_custom3, print_plot=F)
custom_model_outliers3
## $plot

## 
## $outliers
##      observation cooks_distance
## 4              4    0.005122990
## 6              6    0.003010633
## 13            13    0.003331044
## 21            21    0.003427980
## 25            25    0.003954106
## 28            28    0.003340634
## 30            30    0.004966804
## 55            55    0.009444897
## 106          106    0.054926479
## 107          107    0.022928881
## 121          121    0.005051206
## 135          135    0.004771030
## 146          146    0.004054060
## 148          148    0.005561582
## 150          150    0.010288539
## 151          151    0.003585499
## 175          175    0.011488498
## 215          215    0.032261889
## 292          292    0.004150089
## 296          296    0.003451543
## 298          298    0.005511239
## 300          300    0.007040563
## 302          302    0.043441573
## 304          304    0.011739386
## 347          347    0.015223066
## 348          348    0.018526607
## 354          354    0.007230205
## 357          357    0.009873760
## 375          375    0.005439788
## 387          387    0.006553706
## 410          410    0.004619370
## 415          415    0.003967139
## 421          421    0.005199579
## 426          426    0.004592230
## 434          434    0.005791624
## 437          437    0.004063505
## 442          442    0.005356032
## 444          444    0.016826784
## 450          450    0.003644700
## 464          464    0.006275494
## 475          475    0.006718690
## 498          498    0.003982602
## 502          502    0.004151244
## 504          504    0.004619983
## 516          516    0.003581269
## 525          525    0.004188984
## 586          586    0.003475261
## 599          599    0.005326867
## 602          602    0.004154748
## 611          611    0.004816799
## 615          615    0.004138826
## 640          640    0.013984768
## 647          647    0.003361415
## 660          660    0.005966959
## 663          663    0.003914551
## 670          670    0.011009530
## 678          678    0.007873294
## 696          696    0.004925941
## 731          731    0.003415402
## 750          750    0.005462329
## 769          769    0.003794535
## 779          779    0.003321619
## 785          785    0.004504428
## 883          883    0.003624961
## 892          892    0.008899119
## 899          899    0.003828983
## 913          913    0.005675306
## 931          931    0.003788474
## 940          940    0.005193604
## 951          951    0.003525726
## 963          963    0.008204139
## 965          965    0.003083240
## 975          975    0.003194827
## 1000        1000    0.021197819
## 1029        1029    0.003174650
## 1032        1032    0.003421334
## 1045        1045    0.003697353
## 1046        1046    0.005799861
## 1063        1063    0.005117314
## 1064        1064    0.003001825
## 1071        1071    0.003218261
## 1076        1076    0.010076546
## 1119        1119    0.006232997
## 1121        1121    0.004709779
## 1123        1123    0.017505069
## 1127        1127    0.003170341
## 1136        1136    0.016467710
## 1143        1143    0.003465701
## 1146        1146    0.009305390
## 1194        1194    0.006566926
## 1228        1228    0.004029227
## 1237        1237    0.011019359
## 1244        1244    0.023561500
## 1256        1256    0.021255261
## 1266        1266    0.004317916
## 1276        1276    0.005676782
## 1283        1283    0.010966750
## 1310        1310    0.004035856
## 1315        1315    0.003731918
## 1326        1326    0.010714469
## 
## $threshold
## [1] 0.002994012
# 
ols_plot_dffits(lm_fit_custom3)

#ols_plot_diagnostics(lm_fit_custom3)
# 
ols_plot_resid_fit(lm_fit_custom3)

ols_plot_resid_pot(lm_fit_custom3)

ols_pred_rsq(lm_fit_custom3)
## [1] 0.9115029
plot(lm_fit_custom3)

custom_predictions3 = c(predict(lm_fit_custom3, newdata = one_encode_custom_test_data2))
# 
# 
custom_predictions3 = data.frame(Id= one_encode_custom_test_data2$Id, SalePrice=custom_predictions3)
custom_predictions3
##        Id SalePrice
## 1    1461 110330.15
## 2    1462 144747.30
## 3    1463 166291.69
## 4    1464 181464.63
## 5    1465 180850.95
## 6    1466 169515.28
## 7    1467 169766.09
## 8    1468 167011.16
## 9    1469 197321.57
## 10   1470 123183.18
## 11   1471 195730.46
## 12   1472 103109.12
## 13   1473  94421.49
## 14   1474 148687.78
## 15   1475 119258.66
## 16   1476 338912.32
## 17   1477 281562.95
## 18   1478 317195.43
## 19   1479 336440.17
## 20   1480 433389.73
## 21   1481 326364.62
## 22   1482 220966.05
## 23   1483 163406.29
## 24   1484 153123.30
## 25   1485 204891.73
## 26   1486 197489.03
## 27   1487 309771.96
## 28   1488 246341.40
## 29   1489 188571.84
## 30   1490 214782.15
## 31   1491 195189.56
## 32   1492 106502.45
## 33   1493 174361.98
## 34   1494 309342.98
## 35   1495 300483.87
## 36   1496 216818.83
## 37   1497 198675.65
## 38   1498 157280.95
## 39   1499 170122.24
## 40   1500 161023.71
## 41   1501 184041.58
## 42   1502 145037.58
## 43   1503 269422.29
## 44   1504 253210.92
## 45   1505 216498.34
## 46   1506 193375.28
## 47   1507 233102.72
## 48   1508 193054.12
## 49   1509 163497.28
## 50   1510 155525.64
## 51   1511 145652.31
## 52   1512 168247.81
## 53   1513 142978.03
## 54   1514 173029.13
## 55   1515 136746.49
## 56   1516 161802.10
## 57   1517 156855.25
## 58   1518 151446.77
## 59   1519 199031.30
## 60   1520 132218.59
## 61   1521 120335.40
## 62   1522 187204.21
## 63   1523 101745.19
## 64   1524 115549.23
## 65   1525 115160.79
## 66   1526 109590.06
## 67   1527 126015.62
## 68   1528 152282.96
## 69   1529 137352.01
## 70   1530 167239.92
## 71   1531 102643.72
## 72   1532 102871.88
## 73   1533 141766.75
## 74   1534 116260.05
## 75   1535 140210.45
## 76   1536 102651.97
## 77   1537  65306.76
## 78   1538 155415.44
## 79   1539 215088.42
## 80   1540  85757.48
## 81   1541 143146.03
## 82   1542 130353.64
## 83   1543 196673.37
## 84   1544  87703.34
## 85   1545 123892.55
## 86   1546 163169.74
## 87   1547 138066.73
## 88   1548 130568.41
## 89   1549 124094.20
## 90   1550 137288.60
## 91   1551 128111.62
## 92   1552 115824.17
## 93   1553 144533.73
## 94   1554 122262.98
## 95   1555 172712.35
## 96   1556 185415.04
## 97   1557 117607.33
## 98   1558 116605.94
## 99   1559  88815.39
## 100  1560 141549.85
## 101  1561 154547.82
## 102  1562 116370.78
## 103  1563 123376.63
## 104  1564 144666.03
## 105  1565 151689.79
## 106  1566 220373.85
## 107  1567 102733.03
## 108  1568 232982.01
## 109  1569 137001.15
## 110  1570 137473.60
## 111  1571 102058.99
## 112  1572 132523.48
## 113  1573 237169.08
## 114  1574 132431.87
## 115  1575 219909.84
## 116  1576 223561.53
## 117  1577 173526.50
## 118  1578 161653.79
## 119  1579 146665.77
## 120  1580 191553.08
## 121  1581 159232.01
## 122  1582 142874.80
## 123  1583 291189.95
## 124  1584 223978.75
## 125  1585 138335.84
## 126  1586  85407.59
## 127  1587  90409.75
## 128  1588 126066.42
## 129  1589  88680.96
## 130  1590 135375.38
## 131  1591  77646.05
## 132  1592 134083.51
## 133  1593 142520.79
## 134  1594 115862.42
## 135  1595 124251.00
## 136  1596 211364.47
## 137  1597 192892.71
## 138  1598 249975.80
## 139  1599 165015.12
## 140  1600 163946.70
## 141  1601  50518.19
## 142  1602 118970.00
## 143  1603  69909.87
## 144  1604 270191.30
## 145  1605 246517.60
## 146  1606 163009.68
## 147  1607 202755.00
## 148  1608 201372.80
## 149  1609 193729.04
## 150  1610 155210.40
## 151  1611 154591.75
## 152  1612 158303.83
## 153  1613 157096.43
## 154  1614 122354.36
## 155  1615  77091.33
## 156  1616  77891.53
## 157  1617  87809.22
## 158  1618 117582.75
## 159  1619 121964.93
## 160  1620 175483.70
## 161  1621 144246.85
## 162  1622 133026.60
## 163  1623 270274.91
## 164  1624 211268.37
## 165  1625 120809.18
## 166  1626 184519.37
## 167  1627 169877.76
## 168  1628 241911.02
## 169  1629 178424.68
## 170  1630 441490.14
## 171  1631 218550.63
## 172  1632 276348.01
## 173  1633 179186.87
## 174  1634 180305.59
## 175  1635 189331.53
## 176  1636 150558.22
## 177  1637 171303.48
## 178  1638 194209.43
## 179  1639 180510.11
## 180  1640 240715.72
## 181  1641 185188.33
## 182  1642 268226.39
## 183  1643 242078.38
## 184  1644 239333.44
## 185  1645 184143.46
## 186  1646 170238.93
## 187  1647 170280.85
## 188  1648 134275.77
## 189  1649 143008.57
## 190  1650 117453.82
## 191  1651 123268.66
## 192  1652 117881.02
## 193  1653 117635.49
## 194  1654 143875.30
## 195  1655 158781.75
## 196  1656 144198.21
## 197  1657 154110.31
## 198  1658 144472.05
## 199  1659 128809.04
## 200  1660 155767.59
## 201  1661 361599.44
## 202  1662 347088.88
## 203  1663 356110.50
## 204  1664 465129.20
## 205  1665 319995.20
## 206  1666 352255.70
## 207  1667 387219.73
## 208  1668 323656.10
## 209  1669 331393.57
## 210  1670 355867.96
## 211  1671 285440.65
## 212  1672 422613.21
## 213  1673 298037.36
## 214  1674 248156.62
## 215  1675 194524.23
## 216  1676 213795.35
## 217  1677 253136.79
## 218  1678 423303.48
## 219  1679 390930.41
## 220  1680 321398.38
## 221  1681 264217.20
## 222  1682 337640.31
## 223  1683 177683.13
## 224  1684 189558.90
## 225  1685 176565.86
## 226  1686 165853.72
## 227  1687 183547.49
## 228  1688 192244.15
## 229  1689 193961.09
## 230  1690 201359.31
## 231  1691 193301.31
## 232  1692 245801.58
## 233  1693 176638.96
## 234  1694 181841.57
## 235  1695 177934.55
## 236  1696 253057.83
## 237  1697 177403.58
## 238  1698 331876.04
## 239  1699 334048.36
## 240  1700 275509.52
## 241  1701 299009.61
## 242  1702 251187.97
## 243  1703 260158.76
## 244  1704 270698.27
## 245  1705 209209.84
## 246  1706 407367.34
## 247  1707 204268.72
## 248  1708 186753.13
## 249  1709 250979.12
## 250  1710 214878.79
## 251  1711 270400.43
## 252  1712 276237.28
## 253  1713 289158.33
## 254  1714 219863.27
## 255  1715 220149.70
## 256  1716 164768.83
## 257  1717 172046.16
## 258  1718 127996.70
## 259  1719 199342.77
## 260  1720 207951.31
## 261  1721 158625.53
## 262  1722 116150.64
## 263  1723 148460.38
## 264  1724 212173.65
## 265  1725 228249.58
## 266  1726 175779.88
## 267  1727 162992.18
## 268  1728 196395.26
## 269  1729 162052.46
## 270  1730 163710.60
## 271  1731 136203.89
## 272  1732 133956.29
## 273  1733 107544.75
## 274  1734 122343.68
## 275  1735 114047.58
## 276  1736 119682.20
## 277  1737 312337.07
## 278  1738 265310.69
## 279  1739 350465.89
## 280  1740 243757.95
## 281  1741 184209.37
## 282  1742 183864.32
## 283  1743 186092.71
## 284  1744 292493.92
## 285  1745 238598.40
## 286  1746 175204.52
## 287  1747 223016.26
## 288  1748 218927.67
## 289  1749 159723.02
## 290  1750 134962.07
## 291  1751 234390.73
## 292  1752 118382.58
## 293  1753 148910.15
## 294  1754 177830.41
## 295  1755 173706.08
## 296  1756 126920.99
## 297  1757 112790.04
## 298  1758 151040.71
## 299  1759 172703.81
## 300  1760 169717.70
## 301  1761 156346.38
## 302  1762 142175.66
## 303  1763 165693.03
## 304  1764 123168.00
## 305  1765 163341.42
## 306  1766 176492.18
## 307  1767 213988.60
## 308  1768 131630.18
## 309  1769 179162.13
## 310  1770 143580.49
## 311  1771 116049.29
## 312  1772 133109.80
## 313  1773 136411.20
## 314  1774 159476.29
## 315  1775 140723.74
## 316  1776 121477.87
## 317  1777 114654.64
## 318  1778 131220.89
## 319  1779 122147.30
## 320  1780 190792.53
## 321  1781 117175.63
## 322  1782  66635.72
## 323  1783 139726.93
## 324  1784  99007.67
## 325  1785 148180.03
## 326  1786 161425.24
## 327  1787 161443.69
## 328  1788  31131.83
## 329  1789  88383.68
## 330  1790  85173.62
## 331  1791 169387.99
## 332  1792 145544.31
## 333  1793 161491.34
## 334  1794 147887.04
## 335  1795 128934.63
## 336  1796 130387.80
## 337  1797 123239.87
## 338  1798 114972.47
## 339  1799 117850.55
## 340  1800 130222.43
## 341  1801 128370.18
## 342  1802 129610.51
## 343  1803 142447.08
## 344  1804 128433.42
## 345  1805 149291.25
## 346  1806 116116.60
## 347  1807 149908.80
## 348  1808 143610.50
## 349  1809 114800.36
## 350  1810 122253.30
## 351  1811  84207.80
## 352  1812  93433.47
## 353  1813 109643.95
## 354  1814  88542.77
## 355  1815  47848.54
## 356  1816  89601.62
## 357  1817 116163.78
## 358  1818 167370.91
## 359  1819 185983.05
## 360  1820  73268.25
## 361  1821 106088.78
## 362  1822 147042.43
## 363  1823  47793.85
## 364  1824 146458.79
## 365  1825 130296.55
## 366  1826 109334.56
## 367  1827 110097.44
## 368  1828 124628.72
## 369  1829 162862.43
## 370  1830 128657.46
## 371  1831 144716.75
## 372  1832  85363.36
## 373  1833 137387.88
## 374  1834 123191.82
## 375  1835 145015.29
## 376  1836 107825.10
## 377  1837  70254.02
## 378  1838 146073.70
## 379  1839 107649.08
## 380  1840 151242.48
## 381  1841 144942.68
## 382  1842 132264.90
## 383  1843 116871.03
## 384  1844 149859.18
## 385  1845 135688.09
## 386  1846 163238.00
## 387  1847 167562.78
## 388  1848  55412.99
## 389  1849 116928.17
## 390  1850 117019.47
## 391  1851 139066.57
## 392  1852 122557.49
## 393  1853 118416.56
## 394  1854 182780.48
## 395  1855 182916.23
## 396  1856 221502.95
## 397  1857 178317.25
## 398  1858 123843.43
## 399  1859 135169.42
## 400  1860 156624.96
## 401  1861 134254.78
## 402  1862 275776.22
## 403  1863 268385.64
## 404  1864 268455.47
## 405  1865 290853.01
## 406  1866 301009.67
## 407  1867 220865.18
## 408  1868 267446.81
## 409  1869 198869.66
## 410  1870 212245.74
## 411  1871 224677.91
## 412  1872 189550.34
## 413  1873 240382.06
## 414  1874 142661.16
## 415  1875 202599.67
## 416  1876 192821.69
## 417  1877 205296.48
## 418  1878 202078.12
## 419  1879 125474.70
## 420  1880 136121.20
## 421  1881 229373.44
## 422  1882 246069.69
## 423  1883 200837.86
## 424  1884 211788.25
## 425  1885 232177.87
## 426  1886 259226.62
## 427  1887 208027.75
## 428  1888 247235.95
## 429  1889 187075.34
## 430  1890 115823.33
## 431  1891 129792.20
## 432  1892  85836.47
## 433  1893 128044.39
## 434  1894 129059.68
## 435  1895 123597.08
## 436  1896 112882.07
## 437  1897 119356.12
## 438  1898 132873.17
## 439  1899 174629.35
## 440  1900 173288.97
## 441  1901 189706.14
## 442  1902 143666.54
## 443  1903 202975.76
## 444  1904 168516.33
## 445  1905 207245.49
## 446  1906 187502.05
## 447  1907 232164.55
## 448  1908 115477.50
## 449  1909 146591.73
## 450  1910 124807.42
## 451  1911 214414.22
## 452  1912 330795.42
## 453  1913 155520.31
## 454  1914  77441.11
## 455  1915 306921.82
## 456  1916  62328.54
## 457  1917 236572.88
## 458  1918 144749.73
## 459  1919 169776.26
## 460  1920 155170.90
## 461  1921 341330.54
## 462  1922 292389.14
## 463  1923 259022.93
## 464  1924 225453.13
## 465  1925 223942.69
## 466  1926 346334.40
## 467  1927  99215.36
## 468  1928 160592.63
## 469  1929 116555.46
## 470  1930 139799.59
## 471  1931 143232.72
## 472  1932 144164.01
## 473  1933 148074.73
## 474  1934 167564.61
## 475  1935 166011.00
## 476  1936 161907.53
## 477  1937 178560.94
## 478  1938 167125.72
## 479  1939 275169.95
## 480  1940 180620.29
## 481  1941 172517.32
## 482  1942 199432.86
## 483  1943 212339.88
## 484  1944 407147.02
## 485  1945 371010.37
## 486  1946 168474.93
## 487  1947 312166.26
## 488  1948 188774.88
## 489  1949 249936.90
## 490  1950 181877.39
## 491  1951 266450.56
## 492  1952 225613.72
## 493  1953 168940.29
## 494  1954 183365.47
## 495  1955 139054.32
## 496  1956 279790.39
## 497  1957 164736.62
## 498  1958 265390.45
## 499  1959 154052.46
## 500  1960 100300.31
## 501  1961 139167.89
## 502  1962 112755.33
## 503  1963 103267.87
## 504  1964 102492.79
## 505  1965 139375.77
## 506  1966 142764.15
## 507  1967 296048.19
## 508  1968 380174.92
## 509  1969 383937.70
## 510  1970 313559.93
## 511  1971 342412.94
## 512  1972 329671.41
## 513  1973 229540.62
## 514  1974 288295.28
## 515  1975 445350.39
## 516  1976 296082.76
## 517  1977 353227.03
## 518  1978 335548.35
## 519  1979 354108.65
## 520  1980 256355.70
## 521  1981 333943.76
## 522  1982 225197.96
## 523  1983 210675.57
## 524  1984 163411.68
## 525  1985 207784.53
## 526  1986 218405.08
## 527  1987 182492.00
## 528  1988 176679.43
## 529  1989 195580.08
## 530  1990 201116.47
## 531  1991 239197.95
## 532  1992 178825.54
## 533  1993 180707.21
## 534  1994 189328.42
## 535  1995 178184.93
## 536  1996 277278.67
## 537  1997 318991.42
## 538  1998 328709.16
## 539  1999 282124.32
## 540  2000 299325.85
## 541  2001 285440.47
## 542  2002 249062.29
## 543  2003 258011.71
## 544  2004 288493.86
## 545  2005 215120.36
## 546  2006 208894.21
## 547  2007 251308.01
## 548  2008 198335.13
## 549  2009 195785.78
## 550  2010 196967.20
## 551  2011 137885.52
## 552  2012 158790.29
## 553  2013 172286.40
## 554  2014 185371.40
## 555  2015 197869.55
## 556  2016 191313.28
## 557  2017 198021.60
## 558  2018 133234.96
## 559  2019 121014.72
## 560  2020 126233.08
## 561  2021  99842.98
## 562  2022 197227.83
## 563  2023 139864.78
## 564  2024 290769.16
## 565  2025 326337.32
## 566  2026 169639.18
## 567  2027 160006.73
## 568  2028 157347.10
## 569  2029 168387.71
## 570  2030 279215.60
## 571  2031 223442.33
## 572  2032 261651.36
## 573  2033 271194.91
## 574  2034 176806.21
## 575  2035 227902.17
## 576  2036 204819.51
## 577  2037 207389.36
## 578  2038 314777.79
## 579  2039 250778.08
## 580  2040 330506.97
## 581  2041 291397.31
## 582  2042 203518.27
## 583  2043 164192.13
## 584  2044 170947.22
## 585  2045 192211.38
## 586  2046 156525.69
## 587  2047 139865.39
## 588  2048 149198.00
## 589  2049 168598.41
## 590  2050 171976.59
## 591  2051 108510.08
## 592  2052 129023.31
## 593  2053 133284.66
## 594  2054  93549.23
## 595  2055 150503.05
## 596  2056 154909.82
## 597  2057 113538.13
## 598  2058 195459.08
## 599  2059 145825.48
## 600  2060 165480.91
## 601  2061 171547.24
## 602  2062 132463.69
## 603  2063 110497.87
## 604  2064 135607.63
## 605  2065 118766.85
## 606  2066 178604.44
## 607  2067 169023.15
## 608  2068 164719.72
## 609  2069  77711.36
## 610  2070  97900.46
## 611  2071  87473.03
## 612  2072 148705.19
## 613  2073 154116.59
## 614  2074 181836.52
## 615  2075 153376.04
## 616  2076 110813.52
## 617  2077 139481.95
## 618  2078 125447.33
## 619  2079 140514.29
## 620  2080 128431.32
## 621  2081 127694.13
## 622  2082 137942.46
## 623  2083 128856.38
## 624  2084 114432.29
## 625  2085 117461.54
## 626  2086 128226.71
## 627  2087 123896.29
## 628  2088 103656.65
## 629  2089  85089.55
## 630  2090 126414.15
## 631  2091 103666.98
## 632  2092 109883.03
## 633  2093 145788.43
## 634  2094 132025.88
## 635  2095 146609.70
## 636  2096  90838.18
## 637  2097  84874.25
## 638  2098 126101.51
## 639  2099  35265.30
## 640  2100  95416.53
## 641  2101 135598.13
## 642  2102 120903.65
## 643  2103 111348.58
## 644  2104 124314.28
## 645  2105 117737.45
## 646  2106  78328.63
## 647  2107 168319.40
## 648  2108 106159.77
## 649  2109  99195.89
## 650  2110 126514.16
## 651  2111 148128.54
## 652  2112 126066.83
## 653  2113 114838.30
## 654  2114 142863.18
## 655  2115 160935.96
## 656  2116 134789.52
## 657  2117 141112.57
## 658  2118 132848.32
## 659  2119 113937.03
## 660  2120 141008.36
## 661  2121  83951.81
## 662  2122 105003.84
## 663  2123 110579.35
## 664  2124 159673.48
## 665  2125 115856.77
## 666  2126 167353.41
## 667  2127 130400.68
## 668  2128 103002.74
## 669  2129 108286.47
## 670  2130 116836.06
## 671  2131 140045.91
## 672  2132 127770.85
## 673  2133 128485.30
## 674  2134 141396.40
## 675  2135 134414.17
## 676  2136  82629.86
## 677  2137 108367.10
## 678  2138 111518.35
## 679  2139 168524.47
## 680  2140 122120.93
## 681  2141 149030.68
## 682  2142 114687.79
## 683  2143 132647.59
## 684  2144 119997.66
## 685  2145 119246.22
## 686  2146 152831.25
## 687  2147 182350.66
## 688  2148 162419.03
## 689  2149 120761.89
## 690  2150 220041.55
## 691  2151 119353.37
## 692  2152 156230.70
## 693  2153 142709.72
## 694  2154 111072.03
## 695  2155 137377.47
## 696  2156 240574.95
## 697  2157 225048.60
## 698  2158 221288.60
## 699  2159 213780.26
## 700  2160 209709.39
## 701  2161 233173.22
## 702  2162 323070.71
## 703  2163 333843.76
## 704  2164 217609.73
## 705  2165 196441.65
## 706  2166 151861.44
## 707  2167 207841.09
## 708  2168 212802.24
## 709  2169 197314.91
## 710  2170 226218.21
## 711  2171 154634.63
## 712  2172 138787.66
## 713  2173 175490.22
## 714  2174 229697.64
## 715  2175 266408.64
## 716  2176 265581.92
## 717  2177 238083.73
## 718  2178 226060.67
## 719  2179 138093.55
## 720  2180 175701.14
## 721  2181 190366.41
## 722  2182 211399.19
## 723  2183 184092.50
## 724  2184  95256.82
## 725  2185 135692.72
## 726  2186 152300.88
## 727  2187 155007.55
## 728  2188 144968.34
## 729  2189 399730.12
## 730  2190  75552.38
## 731  2191  86066.50
## 732  2192  86615.45
## 733  2193 183913.83
## 734  2194 114146.39
## 735  2195  87656.65
## 736  2196  77884.82
## 737  2197  99510.52
## 738  2198 155052.85
## 739  2199 189704.52
## 740  2200 166991.62
## 741  2201 180651.31
## 742  2202 217258.56
## 743  2203 168692.67
## 744  2204 187341.43
## 745  2205 136825.42
## 746  2206 159624.40
## 747  2207 190323.38
## 748  2208 269588.99
## 749  2209 218828.30
## 750  2210 115511.48
## 751  2211 131718.14
## 752  2212 122918.73
## 753  2213  95102.81
## 754  2214 118502.19
## 755  2215 105056.00
## 756  2216 115945.82
## 757  2217  34801.21
## 758  2218  82942.22
## 759  2219  94226.98
## 760  2220  97642.85
## 761  2221 306680.26
## 762  2222 280320.68
## 763  2223 273242.05
## 764  2224 215299.57
## 765  2225 146839.11
## 766  2226 170936.63
## 767  2227 226831.40
## 768  2228 230341.66
## 769  2229 266196.17
## 770  2230 154635.75
## 771  2231 225058.70
## 772  2232 173834.94
## 773  2233 152502.98
## 774  2234 213188.83
## 775  2235 213605.54
## 776  2236 253996.71
## 777  2237 309390.79
## 778  2238 186856.91
## 779  2239 100513.31
## 780  2240 163402.87
## 781  2241 141606.26
## 782  2242 107145.78
## 783  2243 109460.63
## 784  2244  93106.04
## 785  2245  93246.95
## 786  2246 127601.36
## 787  2247 117342.11
## 788  2248 116794.71
## 789  2249  94066.67
## 790  2250 124362.67
## 791  2251 203108.43
## 792  2252 167412.98
## 793  2253 166927.97
## 794  2254 168597.64
## 795  2255 170500.13
## 796  2256 178677.44
## 797  2257 180083.82
## 798  2258 156193.55
## 799  2259 164364.94
## 800  2260 142332.47
## 801  2261 177603.83
## 802  2262 205204.59
## 803  2263 413622.42
## 804  2264 607049.85
## 805  2265 190061.90
## 806  2266 299983.33
## 807  2267 407674.81
## 808  2268 419063.31
## 809  2269 157147.39
## 810  2270 195892.91
## 811  2271 220295.73
## 812  2272 216175.34
## 813  2273 146127.17
## 814  2274 181685.18
## 815  2275 166174.79
## 816  2276 176101.97
## 817  2277 180521.34
## 818  2278 155767.13
## 819  2279 171824.34
## 820  2280 101355.78
## 821  2281 168629.74
## 822  2282 186450.48
## 823  2283 106612.69
## 824  2284 160030.93
## 825  2285 133205.21
## 826  2286 129968.29
## 827  2287 360428.16
## 828  2288 290365.29
## 829  2289 403823.20
## 830  2290 359808.31
## 831  2291 319220.92
## 832  2292 426233.45
## 833  2293 423433.03
## 834  2294 318596.29
## 835  2295 478257.29
## 836  2296 345238.28
## 837  2297 313426.44
## 838  2298 350569.48
## 839  2299 287026.37
## 840  2300 338565.29
## 841  2301 336993.02
## 842  2302 247656.68
## 843  2303 252334.41
## 844  2304 270341.68
## 845  2305 217756.49
## 846  2306 203691.98
## 847  2307 203921.94
## 848  2308 212259.23
## 849  2309 295145.95
## 850  2310 222346.74
## 851  2311 189522.90
## 852  2312 195207.77
## 853  2313 180626.46
## 854  2314 192187.90
## 855  2315 189803.53
## 856  2316 227342.94
## 857  2317 174088.68
## 858  2318 182507.01
## 859  2319 190823.44
## 860  2320 177797.30
## 861  2321 230323.78
## 862  2322 183108.71
## 863  2323 189287.84
## 864  2324 200723.72
## 865  2325 217555.40
## 866  2326 187744.52
## 867  2327 198194.52
## 868  2328 201680.55
## 869  2329 183347.63
## 870  2330 169601.37
## 871  2331 324299.98
## 872  2332 348957.33
## 873  2333 316927.24
## 874  2334 281056.61
## 875  2335 290471.70
## 876  2336 296253.41
## 877  2337 198947.77
## 878  2338 266778.09
## 879  2339 225505.49
## 880  2340 358590.47
## 881  2341 252890.74
## 882  2342 228902.50
## 883  2343 219547.68
## 884  2344 251882.82
## 885  2345 245413.07
## 886  2346 203910.59
## 887  2347 193389.25
## 888  2348 246225.69
## 889  2349 198470.13
## 890  2350 322119.01
## 891  2351 276608.55
## 892  2352 263461.03
## 893  2353 291970.89
## 894  2354 149468.11
## 895  2355 138300.90
## 896  2356 138176.59
## 897  2357 183452.93
## 898  2358 188393.55
## 899  2359 148843.96
## 900  2360 124368.32
## 901  2361 146406.44
## 902  2362 276142.85
## 903  2363 137239.84
## 904  2364 145289.88
## 905  2365 212313.10
## 906  2366 193192.96
## 907  2367 242860.73
## 908  2368 211370.14
## 909  2369 239366.99
## 910  2370 172904.90
## 911  2371 164405.27
## 912  2372 176594.99
## 913  2373 282528.96
## 914  2374 314966.26
## 915  2375 271007.63
## 916  2376 306893.55
## 917  2377 354854.49
## 918  2378 164694.05
## 919  2379 179539.21
## 920  2380 147870.99
## 921  2381 169436.97
## 922  2382 200965.27
## 923  2383 206215.04
## 924  2384 231163.38
## 925  2385 167414.99
## 926  2386 141005.54
## 927  2387 128914.63
## 928  2388 131571.79
## 929  2389 122507.05
## 930  2390 146851.36
## 931  2391 130599.42
## 932  2392 113285.14
## 933  2393 177222.96
## 934  2394 149760.18
## 935  2395 166314.02
## 936  2396 152653.32
## 937  2397 209872.93
## 938  2398 134114.99
## 939  2399  54873.39
## 940  2400  78971.10
## 941  2401 113818.62
## 942  2402 125964.85
## 943  2403 161662.74
## 944  2404 148309.79
## 945  2405 159996.51
## 946  2406 135477.90
## 947  2407 123072.26
## 948  2408 127236.61
## 949  2409 124543.05
## 950  2410 181329.39
## 951  2411 122576.23
## 952  2412 136043.78
## 953  2413 133002.15
## 954  2414 188431.58
## 955  2415 149454.00
## 956  2416 128729.92
## 957  2417 134625.42
## 958  2418 120390.79
## 959  2419 110828.14
## 960  2420 140425.00
## 961  2421 137931.02
## 962  2422  95932.68
## 963  2423 111143.77
## 964  2424 146830.02
## 965  2425 217862.61
## 966  2426 115246.30
## 967  2427 124819.13
## 968  2428 182440.63
## 969  2429 111308.48
## 970  2430 141906.87
## 971  2431 132535.27
## 972  2432 126882.27
## 973  2433 133264.04
## 974  2434 143943.30
## 975  2435 150184.38
## 976  2436 113127.56
## 977  2437 106756.93
## 978  2438 132177.21
## 979  2439 109027.35
## 980  2440 115596.29
## 981  2441 109197.77
## 982  2442 106978.56
## 983  2443 118311.96
## 984  2444 129298.69
## 985  2445  83253.40
## 986  2446 120495.07
## 987  2447 195842.90
## 988  2448 129562.99
## 989  2449 102259.98
## 990  2450 137942.59
## 991  2451 135281.99
## 992  2452 162870.16
## 993  2453  82849.24
## 994  2454 117249.91
## 995  2455 138136.99
## 996  2456 127950.02
## 997  2457 129181.85
## 998  2458 144107.88
## 999  2459 101628.86
## 1000 2460 161023.34
## 1001 2461 127064.20
## 1002 2462 126375.58
## 1003 2463 136700.95
## 1004 2464 140848.98
## 1005 2465 136406.08
## 1006 2466 114174.96
## 1007 2467 167701.14
## 1008 2468  93466.99
## 1009 2469  82382.68
## 1010 2470 164298.60
## 1011 2471 185241.60
## 1012 2472 142842.90
## 1013 2473 109570.56
## 1014 2474  89007.66
## 1015 2475 181109.28
## 1016 2476 120480.76
## 1017 2477 129485.54
## 1018 2478 141534.36
## 1019 2479 127490.50
## 1020 2480 169549.00
## 1021 2481 129104.09
## 1022 2482 138319.49
## 1023 2483 111657.35
## 1024 2484 133026.51
## 1025 2485 106170.88
## 1026 2486 151983.09
## 1027 2487 152866.30
## 1028 2488 167115.24
## 1029 2489 152260.85
## 1030 2490 154308.99
## 1031 2491 107138.98
## 1032 2492 183431.05
## 1033 2493 159783.80
## 1034 2494 163969.59
## 1035 2495 107298.75
## 1036 2496 291779.89
## 1037 2497 134874.04
## 1038 2498 112400.92
## 1039 2499  86374.30
## 1040 2500 106537.94
## 1041 2501 125591.60
## 1042 2502 140023.75
## 1043 2503  95513.47
## 1044 2504 197899.67
## 1045 2505 223920.90
## 1046 2506 250128.94
## 1047 2507 301044.95
## 1048 2508 250680.59
## 1049 2509 210180.97
## 1050 2510 212943.83
## 1051 2511 175993.51
## 1052 2512 206003.61
## 1053 2513 215643.32
## 1054 2514 285042.09
## 1055 2515 149939.74
## 1056 2516 188672.64
## 1057 2517 141484.44
## 1058 2518 158805.18
## 1059 2519 216895.31
## 1060 2520 211286.46
## 1061 2521 200044.57
## 1062 2522 226515.51
## 1063 2523 131544.10
## 1064 2524 151252.30
## 1065 2525 153498.35
## 1066 2526 143456.64
## 1067 2527 139284.62
## 1068 2528 129581.25
## 1069 2529 196915.59
## 1070 2530 103763.65
## 1071 2531 231079.51
## 1072 2532 231126.28
## 1073 2533 199418.00
## 1074 2534 220330.71
## 1075 2535 271750.03
## 1076 2536 253143.70
## 1077 2537 219851.45
## 1078 2538 203404.90
## 1079 2539 184356.57
## 1080 2540 190539.09
## 1081 2541 196859.89
## 1082 2542 170341.05
## 1083 2543 112873.99
## 1084 2544  99781.25
## 1085 2545 154118.61
## 1086 2546 123476.86
## 1087 2547 144879.00
## 1088 2548 125488.96
## 1089 2549 149887.83
## 1090 2550 560874.94
## 1091 2551 125660.54
## 1092 2552 115717.36
## 1093 2553  81265.50
## 1094 2554  94337.34
## 1095 2555 150674.10
## 1096 2556  90041.82
## 1097 2557 112015.17
## 1098 2558 141523.05
## 1099 2559 145495.82
## 1100 2560 169240.46
## 1101 2561 179855.19
## 1102 2562 150729.54
## 1103 2563 161617.38
## 1104 2564 208795.62
## 1105 2565 164323.78
## 1106 2566 162115.67
## 1107 2567 148602.81
## 1108 2568 213303.62
## 1109 2569 211884.87
## 1110 2570 115086.85
## 1111 2571 187787.43
## 1112 2572 152178.18
## 1113 2573 222931.41
## 1114 2574 369390.74
## 1115 2575 114366.06
## 1116 2576 111800.79
## 1117 2577 137691.52
## 1118 2578  89575.48
## 1119 2579  67261.40
## 1120 2580 117845.88
## 1121 2581 110813.98
## 1122 2582 103269.83
## 1123 2583 283088.71
## 1124 2584 174246.95
## 1125 2585 169366.33
## 1126 2586 214663.06
## 1127 2587 196623.17
## 1128 2588 149840.56
## 1129 2589 150446.55
## 1130 2590 233578.51
## 1131 2591 292467.45
## 1132 2592 228324.15
## 1133 2593 279611.84
## 1134 2594 160299.46
## 1135 2595 197722.64
## 1136 2596 316353.02
## 1137 2597 172292.36
## 1138 2598 275854.46
## 1139 2599 327578.81
## 1140 2600 171383.71
## 1141 2601 156876.11
## 1142 2602  86356.05
## 1143 2603  88137.45
## 1144 2604  76402.51
## 1145 2605  88066.67
## 1146 2606 141916.71
## 1147 2607 196418.93
## 1148 2608 217967.92
## 1149 2609 157234.63
## 1150 2610 104558.21
## 1151 2611  97817.83
## 1152 2612 160706.08
## 1153 2613 124117.23
## 1154 2614 123249.08
## 1155 2615 158345.49
## 1156 2616 144029.96
## 1157 2617 169537.42
## 1158 2618 182397.62
## 1159 2619 186291.88
## 1160 2620 180728.18
## 1161 2621 174063.40
## 1162 2622 168160.18
## 1163 2623 224972.57
## 1164 2624 266692.49
## 1165 2625 391608.82
## 1166 2626 166957.86
## 1167 2627 160640.01
## 1168 2628 482501.97
## 1169 2629 579665.39
## 1170 2630 398825.46
## 1171 2631 479404.19
## 1172 2632 472937.00
## 1173 2633 292773.64
## 1174 2634 419784.82
## 1175 2635 157628.48
## 1176 2636 182948.34
## 1177 2637 167066.87
## 1178 2638 312197.26
## 1179 2639 196972.96
## 1180 2640 147769.00
## 1181 2641 122324.75
## 1182 2642 184389.94
## 1183 2643 116864.06
## 1184 2644 111861.64
## 1185 2645 105531.10
## 1186 2646 102388.42
## 1187 2647 105134.78
## 1188 2648 147946.22
## 1189 2649 147315.95
## 1190 2650 146982.45
## 1191 2651 142907.16
## 1192 2652 375478.61
## 1193 2653 333535.13
## 1194 2654 253717.59
## 1195 2655 382065.46
## 1196 2656 335842.56
## 1197 2657 311110.87
## 1198 2658 316179.92
## 1199 2659 275144.10
## 1200 2660 314195.46
## 1201 2661 368123.20
## 1202 2662 378628.20
## 1203 2663 306269.32
## 1204 2664 276557.04
## 1205 2665 335535.18
## 1206 2666 278425.08
## 1207 2667 190895.02
## 1208 2668 196707.63
## 1209 2669 173363.08
## 1210 2670 259946.42
## 1211 2671 194510.84
## 1212 2672 204689.12
## 1213 2673 201839.77
## 1214 2674 205587.34
## 1215 2675 166382.72
## 1216 2676 192330.51
## 1217 2677 167019.13
## 1218 2678 248452.64
## 1219 2679 292974.01
## 1220 2680 304770.58
## 1221 2681 329695.87
## 1222 2682 305286.75
## 1223 2683 352117.14
## 1224 2684 310327.72
## 1225 2685 334022.62
## 1226 2686 283075.09
## 1227 2687 306833.96
## 1228 2688 228744.03
## 1229 2689 203073.58
## 1230 2690 391680.80
## 1231 2691 199665.81
## 1232 2692 126425.78
## 1233 2693 192429.74
## 1234 2694 143180.93
## 1235 2695 187899.12
## 1236 2696 183071.30
## 1237 2697 161026.63
## 1238 2698 194223.13
## 1239 2699 182179.72
## 1240 2700 152687.87
## 1241 2701 159718.92
## 1242 2702 135246.46
## 1243 2703 141653.32
## 1244 2704 138767.99
## 1245 2705 112070.28
## 1246 2706 111436.97
## 1247 2707 131712.86
## 1248 2708 124136.70
## 1249 2709 100818.88
## 1250 2710 118501.94
## 1251 2711 298555.14
## 1252 2712 346272.28
## 1253 2713 165689.73
## 1254 2714 155951.76
## 1255 2715 169650.90
## 1256 2716 151373.16
## 1257 2717 205832.51
## 1258 2718 220827.94
## 1259 2719 152043.92
## 1260 2720 179710.05
## 1261 2721 142021.01
## 1262 2722 148475.82
## 1263 2723 142923.41
## 1264 2724 130104.39
## 1265 2725 132167.43
## 1266 2726 134984.74
## 1267 2727 182890.41
## 1268 2728 178511.19
## 1269 2729 146529.73
## 1270 2730 135042.02
## 1271 2731 137094.84
## 1272 2732 115296.00
## 1273 2733 162622.80
## 1274 2734 157530.28
## 1275 2735 131543.60
## 1276 2736 129782.64
## 1277 2737 112982.36
## 1278 2738 152493.96
## 1279 2739 173203.99
## 1280 2740 131534.71
## 1281 2741 137392.75
## 1282 2742 158514.21
## 1283 2743 136833.90
## 1284 2744 159244.40
## 1285 2745 127138.39
## 1286 2746 137063.74
## 1287 2747 176973.18
## 1288 2748 123574.01
## 1289 2749 116337.11
## 1290 2750 141117.96
## 1291 2751 133529.61
## 1292 2752 209907.89
## 1293 2753 153845.69
## 1294 2754 207550.58
## 1295 2755 140324.66
## 1296 2756  58975.39
## 1297 2757  90891.98
## 1298 2758  86956.57
## 1299 2759 133177.08
## 1300 2760 106175.94
## 1301 2761 148354.50
## 1302 2762 146601.86
## 1303 2763 199398.41
## 1304 2764 182658.04
## 1305 2765 197710.98
## 1306 2766 121025.87
## 1307 2767 102284.87
## 1308 2768 130934.33
## 1309 2769 116807.86
## 1310 2770 162161.99
## 1311 2771 121853.09
## 1312 2772 115284.79
## 1313 2773 138545.01
## 1314 2774 115464.47
## 1315 2775  94065.32
## 1316 2776 148032.23
## 1317 2777 150459.13
## 1318 2778 112482.02
## 1319 2779 101579.17
## 1320 2780  94952.44
## 1321 2781  88498.05
## 1322 2782  77864.36
## 1323 2783  72590.05
## 1324 2784 118935.40
## 1325 2785 109828.53
## 1326 2786  72318.13
## 1327 2787 122300.30
## 1328 2788  60975.56
## 1329 2789 152667.37
## 1330 2790  91329.81
## 1331 2791 107106.73
## 1332 2792  50526.17
## 1333 2793 146924.73
## 1334 2794  91468.81
## 1335 2795 116158.54
## 1336 2796 104867.25
## 1337 2797 188237.91
## 1338 2798  93586.90
## 1339 2799 114122.00
## 1340 2800  56401.84
## 1341 2801 110193.22
## 1342 2802 134223.50
## 1343 2803 169086.64
## 1344 2804 145451.94
## 1345 2805 104493.95
## 1346 2806  98541.29
## 1347 2807 162307.97
## 1348 2808 140609.27
## 1349 2809 137936.45
## 1350 2810 115650.16
## 1351 2811 162319.76
## 1352 2812 157771.77
## 1353 2813 167377.47
## 1354 2814 165917.84
## 1355 2815 111215.06
## 1356 2816 219512.20
## 1357 2817 157265.64
## 1358 2818 140365.73
## 1359 2819 195421.29
## 1360 2820 123489.83
## 1361 2821 109454.73
## 1362 2822 178338.76
## 1363 2823 231149.37
## 1364 2824 142825.95
## 1365 2825 145533.20
## 1366 2826 113628.69
## 1367 2827 124626.05
## 1368 2828 210570.75
## 1369 2829 204491.22
## 1370 2830 236091.91
## 1371 2831 159828.10
## 1372 2832 251993.95
## 1373 2833 288336.92
## 1374 2834 223618.27
## 1375 2835 211215.98
## 1376 2836 196158.60
## 1377 2837 173670.54
## 1378 2838 151725.40
## 1379 2839 190588.02
## 1380 2840 197220.61
## 1381 2841 201435.49
## 1382 2842 232612.17
## 1383 2843 147131.46
## 1384 2844 178516.31
## 1385 2845 117511.53
## 1386 2846 203994.51
## 1387 2847 193697.61
## 1388 2848 217807.79
## 1389 2849 207815.62
## 1390 2850 266805.65
## 1391 2851 244240.02
## 1392 2852 239251.11
## 1393 2853 236698.32
## 1394 2854 137369.59
## 1395 2855 199099.76
## 1396 2856 215397.17
## 1397 2857 195099.77
## 1398 2858 209962.97
## 1399 2859 132239.94
## 1400 2860 125312.10
## 1401 2861 113221.10
## 1402 2862 176197.90
## 1403 2863 114327.00
## 1404 2864 202148.05
## 1405 2865 143150.51
## 1406 2866 144499.14
## 1407 2867  87635.04
## 1408 2868 116994.51
## 1409 2869  86080.72
## 1410 2870 130943.29
## 1411 2871  71638.24
## 1412 2872  54958.82
## 1413 2873 104744.54
## 1414 2874 131639.19
## 1415 2875 121618.27
## 1416 2876 175182.21
## 1417 2877 114306.49
## 1418 2878 168389.96
## 1419 2879 133888.91
## 1420 2880 107310.64
## 1421 2881 188468.66
## 1422 2882 155839.07
## 1423 2883 184412.70
## 1424 2884 229222.56
## 1425 2885 185837.26
## 1426 2886 198100.17
## 1427 2887 100584.83
## 1428 2888 129656.76
## 1429 2889  68087.61
## 1430 2890  71571.77
## 1431 2891 130414.11
## 1432 2892  44034.29
## 1433 2893  92196.57
## 1434 2894  66947.82
## 1435 2895 317621.22
## 1436 2896 269241.23
## 1437 2897 185084.07
## 1438 2898 169620.92
## 1439 2899 194805.65
## 1440 2900 165200.87
## 1441 2901 210495.50
## 1442 2902 200940.83
## 1443 2903 320683.92
## 1444 2904 331136.84
## 1445 2905 103980.83
## 1446 2906 199626.41
## 1447 2907 107726.08
## 1448 2908 132573.35
## 1449 2909 166929.86
## 1450 2910  70170.29
## 1451 2911  86076.74
## 1452 2912 149831.87
## 1453 2913  81561.72
## 1454 2914  76219.45
## 1455 2915  76993.23
## 1456 2916  81856.96
## 1457 2917 141021.67
## 1458 2918 119236.11
## 1459 2919 190268.35
write_csv(custom_predictions3, "../kaggleData/customSelection5Predictions.csv")
custom3_vif = VIF(lm_fit_custom3)
c(custom3_vif)
##                       OverallQual                        GarageCars 
##                          3.434361                          2.010731 
##                      BsmtFullBath                    KitchenQual_Ex 
##                          1.326007                          2.004140 
##                      YearRemodAdd              Neighborhood_OldTown 
##                          2.620698                          2.850269 
##                           LotArea              Neighborhood_Crawfor 
##                          6.556096                          1.908920 
##              Neighborhood_NridgHt             SaleCondition_Abnorml 
##                          3.469608                          2.368389 
##              Neighborhood_Somerst                          HalfBath 
##                          4.803565                          2.161594 
##              Neighborhood_Edwards              SaleCondition_Normal 
##                          3.504457                          2.827885 
##              SaleCondition_Alloca                      BsmtHalfBath 
##                          1.207898                          1.161304 
##                          FullBath              Neighborhood_ClearCr 
##                          2.809789                          1.788318 
##              Neighborhood_MeadowV              Neighborhood_SawyerW 
##                          1.566787                          2.473483 
##              Neighborhood_Mitchel               Neighborhood_BrDale 
##                          2.161492                          1.566741 
##              SaleCondition_Family             SaleCondition_AdjLand 
##                          1.577619                          1.173241 
##               Neighborhood_IDOTRR                            YrSold 
##                          1.614529                          1.096879 
##              Neighborhood_NPkVill                 HouseStyle_SFoyer 
##                          1.325062                          1.531387 
##               Neighborhood_Timber                    KitchenQual_Fa 
##                          2.331772                          1.193519 
##               Neighborhood_Sawyer              Neighborhood_Blueste 
##                          3.328882                          1.084020 
##                        Fireplaces              Neighborhood_Blmngtn 
##                          1.595170                          1.644598 
##              Neighborhood_CollgCr              Neighborhood_Gilbert 
##                          5.012460                          3.430686 
##              Neighborhood_Veenker              Neighborhood_StoneBr 
##                          1.478423                          2.806409 
##                 HouseStyle_1.5Unf                           Remodel 
##                          1.195906                          1.677114 
##                Neighborhood_SWISU                 HouseStyle_1.5Fin 
##                          1.412885                          1.814536 
##                      BedroomAbvGr                 HouseStyle_1Story 
##                          3.291560                          2.860500 
##                 HouseStyle_2.5Unf               Neighborhood_NWAmes 
##                          1.120998                          2.993493 
##                    KitchenQual_Gd                Neighborhood_NAmes 
##                          2.355678                          5.503091 
##              Neighborhood_NoRidge          GrLivArea:KitchenQual_Gd 
##                          2.486230                          2.999251 
##     Neighborhood_NAmes:GrLivArea2   Neighborhood_OldTown:GrLivArea2 
##                          2.232012                          1.187701 
##      LotArea:Neighborhood_NridgHt Neighborhood_NridgHt:BedroomAbvGr 
##                          2.073721                          2.524357 
##   Neighborhood_Somerst:GrLivArea2   Neighborhood_StoneBr:GrLivArea2 
##                          1.632930                          1.768739 
##      HouseStyle_1Story:GrLivArea2     GrLivArea:Neighborhood_Sawyer 
##                          2.739702                          1.742856 
##   Neighborhood_Edwards:GrLivArea2     LotArea:SaleCondition_Abnorml 
##                          1.861740                          1.202514 
##         LotArea:HouseStyle_1Story       KitchenQual_Ex:BedroomAbvGr 
##                          5.263818                          1.677084 
##       KitchenQual_Gd:BedroomAbvGr      LotArea:Neighborhood_Somerst 
##                          3.422137                          2.165835 
##      LotArea:Neighborhood_Edwards Neighborhood_Veenker:BedroomAbvGr 
##                          1.168462                          1.294468 
##   BedroomAbvGr:Neighborhood_NAmes SaleCondition_Family:BedroomAbvGr 
##                          2.121611                          1.437623 
## Neighborhood_CollgCr:BedroomAbvGr      LotArea:Neighborhood_StoneBr 
##                          1.423452                          1.784853 
##    Neighborhood_Timber:GrLivArea2  Neighborhood_Timber:BedroomAbvGr 
##                          2.664047                          2.254485